From b794c4dcc8b16f4c0287879f41055ff4c7f08338 Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Fri, 30 Aug 2024 11:54:23 +0200
Subject: [PATCH 1/9] Feature/add todo for emergency fund positions value
calculation (#3684)
* Add todo
---
apps/api/src/app/portfolio/portfolio.service.ts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts
index 4e5ae2bb6..01dd55112 100644
--- a/apps/api/src/app/portfolio/portfolio.service.ts
+++ b/apps/api/src/app/portfolio/portfolio.service.ts
@@ -1394,6 +1394,8 @@ export class PortfolioService {
}: {
holdings: PortfolioDetails['holdings'];
}) {
+ // TODO: Use current value of activities instead of holdings
+ // tagged with EMERGENCY_FUND_TAG_ID
const emergencyFundHoldings = Object.values(holdings).filter(({ tags }) => {
return (
tags?.some(({ id }) => {
From 267023f2c9b3c09569b65ca1a3d879f51ff2b792 Mon Sep 17 00:00:00 2001
From: Paulina <71526180+paulinek13@users.noreply.github.com>
Date: Sat, 31 Aug 2024 10:46:24 +0200
Subject: [PATCH 2/9] Feature/improve language localization for polish (#3713)
* Improve language localization for Polish
---
apps/client/src/locales/messages.pl.xlf | 432 ++++++++++++------------
1 file changed, 216 insertions(+), 216 deletions(-)
diff --git a/apps/client/src/locales/messages.pl.xlf b/apps/client/src/locales/messages.pl.xlf
index c7e54de73..52dfdfba2 100644
--- a/apps/client/src/locales/messages.pl.xlf
+++ b/apps/client/src/locales/messages.pl.xlf
@@ -2011,7 +2011,7 @@
Do you really want to delete this user?
- Do you really want to delete this user?
+ Czy na pewno chcesz usunąć tego użytkownika?
apps/client/src/app/components/admin-users/admin-users.component.ts
125
@@ -2019,7 +2019,7 @@
User
- User
+ Użytkownik
apps/client/src/app/components/admin-users/admin-users.html
29
@@ -2027,7 +2027,7 @@
Registration
- Registration
+ Rejestracja
apps/client/src/app/components/admin-users/admin-users.html
97
@@ -2035,7 +2035,7 @@
Engagement per Day
- Engagement per Day
+ Zaangażowanie na Dzień
apps/client/src/app/components/admin-users/admin-users.html
157
@@ -2043,7 +2043,7 @@
Last Request
- Last Request
+ Ostatnie Żądanie
apps/client/src/app/components/admin-users/admin-users.html
181
@@ -2051,7 +2051,7 @@
Impersonate User
- Impersonate User
+ Wciel się w Użytkownika
apps/client/src/app/components/admin-users/admin-users.html
218
@@ -2059,7 +2059,7 @@
Delete User
- Delete User
+ Usuń Użytkownika
apps/client/src/app/components/admin-users/admin-users.html
229
@@ -2067,7 +2067,7 @@
Performance
- Performance
+ Wydajność
apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.html
6
@@ -2083,7 +2083,7 @@
Compare with...
- Compare with...
+ Porównaj z...
apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.html
18
@@ -2091,7 +2091,7 @@
Manage Benchmarks
- Manage Benchmarks
+ Zarządzanie Benchmarkami
apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.html
35
@@ -2115,7 +2115,7 @@
Benchmark
- Benchmark
+ Poziom Odniesienia (Benchmark)
apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.ts
128
@@ -2123,7 +2123,7 @@
Current Market Mood
- Current Market Mood
+ Obecny Nastrój Rynkowy
apps/client/src/app/components/fear-and-greed-index/fear-and-greed-index.component.html
12
@@ -2131,7 +2131,7 @@
Overview
- Overview
+ Przegląd
apps/client/src/app/components/header/header.component.html
28
@@ -2143,7 +2143,7 @@
Portfolio
- Portfolio
+ Portfel
apps/client/src/app/components/header/header.component.html
41
@@ -2155,7 +2155,7 @@
Admin Control
- Admin Control
+ Nadzór Administratora
apps/client/src/app/components/header/header.component.html
68
@@ -2167,7 +2167,7 @@
Me
- Me
+ Ja
apps/client/src/app/components/header/header.component.html
203
@@ -2175,7 +2175,7 @@
User
- User
+ Użytkownik
apps/client/src/app/components/header/header.component.html
221
@@ -2183,7 +2183,7 @@
My Ghostfolio
- My Ghostfolio
+ Moje Ghostfolio
apps/client/src/app/components/header/header.component.html
262
@@ -2191,7 +2191,7 @@
About Ghostfolio
- About Ghostfolio
+ O Ghostfolio
apps/client/src/app/components/header/header.component.html
303
@@ -2203,7 +2203,7 @@
Sign in
- Sign in
+ Zaloguj się
apps/client/src/app/components/header/header.component.html
394
@@ -2215,7 +2215,7 @@
Get started
- Get started
+ Rozpocznij
apps/client/src/app/components/header/header.component.html
404
@@ -2223,7 +2223,7 @@
Sign in
- Sign in
+ Zaloguj się
apps/client/src/app/app-routing.module.ts
141
@@ -2247,7 +2247,7 @@
Manage Activities
- Manage Activities
+ Zarządzaj Aktywnościami
apps/client/src/app/components/home-holdings/home-holdings.html
61
@@ -2255,7 +2255,7 @@
Fear
- Fear
+ Zagrożenie
apps/client/src/app/components/home-market/home-market.component.ts
27
@@ -2267,7 +2267,7 @@
Greed
- Greed
+ Zachłanność
apps/client/src/app/components/home-market/home-market.component.ts
28
@@ -2279,7 +2279,7 @@
Last Days
- Last Days
+ Ostatnie Dni
apps/client/src/app/components/home-market/home-market.html
7
@@ -2359,7 +2359,7 @@
Add activity
- Add activity
+ Dodaj działalność
apps/client/src/app/components/home-overview/home-overview.html
52
@@ -2371,7 +2371,7 @@
Summary
- Summary
+ Podsumowanie
apps/client/src/app/components/home-summary/home-summary.html
2
@@ -2379,7 +2379,7 @@
Total Amount
- Total Amount
+ Całkowita Kwota
apps/client/src/app/components/investment-chart/investment-chart.component.ts
141
@@ -2387,7 +2387,7 @@
Savings Rate
- Savings Rate
+ Stopa Oszczędności
apps/client/src/app/components/investment-chart/investment-chart.component.ts
213
@@ -2395,7 +2395,7 @@
Security Token
- Security Token
+ Token Bezpieczeństwa
apps/client/src/app/components/login-with-access-token-dialog/login-with-access-token-dialog.html
11
@@ -2411,7 +2411,7 @@
or
- or
+ lub
apps/client/src/app/components/login-with-access-token-dialog/login-with-access-token-dialog.html
31
@@ -2439,7 +2439,7 @@
Sign in with Internet Identity
- Sign in with Internet Identity
+ Zaloguj się przy użyciu Tożsamości Internetowej (Internet Identity)
apps/client/src/app/components/login-with-access-token-dialog/login-with-access-token-dialog.html
42
@@ -2447,7 +2447,7 @@
Sign in with Google
- Sign in with Google
+ Zaloguj się przez Google
apps/client/src/app/components/login-with-access-token-dialog/login-with-access-token-dialog.html
52
@@ -2455,7 +2455,7 @@
Stay signed in
- Stay signed in
+ Pozostań zalogowany
apps/client/src/app/components/login-with-access-token-dialog/login-with-access-token-dialog.html
61
@@ -2463,7 +2463,7 @@
Time in Market
- Time in Market
+ Czas na Rynku
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
3
@@ -2471,7 +2471,7 @@
Buy
- Buy
+ Kupno
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
31
@@ -2479,7 +2479,7 @@
Sell
- Sell
+ Sprzedaż
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
43
@@ -2487,7 +2487,7 @@
Investment
- Investment
+ Inwestycja
apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html
168
@@ -2499,7 +2499,7 @@
Absolute Gross Performance
- Absolute Gross Performance
+ Bezwzględne Osiągi Brutto
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
70
@@ -2507,7 +2507,7 @@
Gross Performance
- Gross Performance
+ Osiągi Brutto
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
85
@@ -2515,7 +2515,7 @@
Fees
- Fees
+ Opłaty
apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html
203
@@ -2531,7 +2531,7 @@
Absolute Net Performance
- Absolute Net Performance
+ Bezwzględne Osiągi Netto
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
126
@@ -2539,7 +2539,7 @@
Net Performance
- Net Performance
+ Osiągi Netto
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
141
@@ -2547,7 +2547,7 @@
Total Assets
- Total Assets
+ Suma Aktywów
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
167
@@ -2555,7 +2555,7 @@
Valuables
- Valuables
+ Kosztowności
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
180
@@ -2563,7 +2563,7 @@
Emergency Fund
- Emergency Fund
+ Fundusz Rezerwowy
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
192
@@ -2579,7 +2579,7 @@
Cash
- Cash
+ Gotówka
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
226
@@ -2587,7 +2587,7 @@
Assets
- Assets
+ Aktywa
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
239
@@ -2595,7 +2595,7 @@
Buying Power
- Buying Power
+ Siła Nabywcza
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
252
@@ -2603,7 +2603,7 @@
Excluded from Analysis
- Excluded from Analysis
+ Wykluczone z Analizy
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
264
@@ -2611,7 +2611,7 @@
Liabilities
- Liabilities
+ Pasywa (Zobowiązania Finansowe)
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
279
@@ -2623,7 +2623,7 @@
Net Worth
- Net Worth
+ Wartość Netto
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
297
@@ -2631,7 +2631,7 @@
Annualized Performance
- Annualized Performance
+ Osiągi w Ujęciu Rocznym
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
309
@@ -2639,7 +2639,7 @@
Interest
- Interest
+ Odsetki
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
331
@@ -2647,7 +2647,7 @@
Dividend
- Dividend
+ Dywidenda
apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html
181
@@ -2671,7 +2671,7 @@
Please enter the amount of your emergency fund:
- Please enter the amount of your emergency fund:
+ Proszę wprowadzić wysokość funduszu rezerwowego:
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.ts
58
@@ -2679,7 +2679,7 @@
Change
- Change
+ Zmień
apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html
65
@@ -2691,7 +2691,7 @@
Average Unit Price
- Average Unit Price
+ Średnia Cena Jednostkowa
apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html
103
@@ -2699,7 +2699,7 @@
Minimum Price
- Minimum Price
+ Cena Minimalna
apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html
130
@@ -2707,7 +2707,7 @@
Maximum Price
- Maximum Price
+ Cena Maksymalna
apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html
146
@@ -2715,7 +2715,7 @@
Quantity
- Quantity
+ Ilość
apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html
156
@@ -2731,7 +2731,7 @@
Report Data Glitch
- Report Data Glitch
+ Zgłoś Błąd Danych
apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html
448
@@ -3147,7 +3147,7 @@
Distraction-free experience for turbulent times
- Distraction-free experience for turbulent times
+ Doświadczenie bez zakłóceń w niespokojnych czasach
apps/client/src/app/components/user-account-settings/user-account-settings.html
174
@@ -3163,7 +3163,7 @@
Sign in with fingerprint
- Zaloguj się za pomocą linii papilarnych
+ Logowanie za pomocą linii papilarnych
apps/client/src/app/components/user-account-settings/user-account-settings.html
191
@@ -3179,7 +3179,7 @@
Sneak peek at upcoming functionality
- Włącz podgląd nadchodzących funkcji
+ Podgląd nadchodzących funkcjonalności
apps/client/src/app/components/user-account-settings/user-account-settings.html
208
@@ -5047,7 +5047,7 @@
Open Source Alternative to
- Open Source Alternative to
+ Alternatywa Open Source dla
apps/client/src/app/pages/resources/personal-finance-tools/personal-finance-tools-page-routing.module.ts
27
@@ -5055,7 +5055,7 @@
Discover Open Source Alternatives for Personal Finance Tools
- Discover Open Source Alternatives for Personal Finance Tools
+ Odkryj alternatywy Open Source dla Narzędzi Finansów Osobistych
apps/client/src/app/pages/resources/personal-finance-tools/personal-finance-tools-page.html
4
@@ -5063,7 +5063,7 @@
This overview page features a curated collection of personal finance tools compared to the open source alternative Ghostfolio. If you value transparency, data privacy, and community collaboration, Ghostfolio provides an excellent opportunity to take control of your financial management.
- This overview page features a curated collection of personal finance tools compared to the open source alternative Ghostfolio. If you value transparency, data privacy, and community collaboration, Ghostfolio provides an excellent opportunity to take control of your financial management.
+ Ta przeglądowa strona zawiera wyselekcjonowaną kolekcję narzędzi do finansów osobistych w porównaniu z alternatywą open source Ghostfolio. Jeśli cenisz sobie przejrzystość, prywatność danych i współpracę ze społecznością, Ghostfolio stanowi doskonałą okazję do przejęcia kontroli nad swoim zarządzaniem finansami.
apps/client/src/app/pages/resources/personal-finance-tools/personal-finance-tools-page.html
8
@@ -5071,7 +5071,7 @@
Explore the links below to compare a variety of personal finance tools with Ghostfolio.
- Explore the links below to compare a variety of personal finance tools with Ghostfolio.
+ Zapoznaj się z poniższymi linkami, aby móc porównać różne narzędzia do finansów osobistych z Ghostfolio.
apps/client/src/app/pages/resources/personal-finance-tools/personal-finance-tools-page.html
16
@@ -5079,7 +5079,7 @@
Open Source Alternative to
- Open Source Alternative to
+ Alternatywa Open Source dla
apps/client/src/app/pages/resources/personal-finance-tools/personal-finance-tools-page.html
42
@@ -5087,7 +5087,7 @@
The Open Source Alternative to
- The Open Source Alternative to
+ Alternatywa Open Source dla
apps/client/src/app/pages/resources/personal-finance-tools/product-page.html
8
@@ -5095,7 +5095,7 @@
Are you looking for an open source alternative to ? Ghostfolio is a powerful portfolio management tool that provides individuals with a comprehensive platform to track, analyze, and optimize their investments. Whether you are an experienced investor or just starting out, Ghostfolio offers an intuitive user interface and a wide range of functionalities to help you make informed decisions and take control of your financial future.
- Are you looking for an open source alternative to ? Ghostfolio is a powerful portfolio management tool that provides individuals with a comprehensive platform to track, analyze, and optimize their investments. Whether you are an experienced investor or just starting out, Ghostfolio offers an intuitive user interface and a wide range of functionalities to help you make informed decisions and take control of your financial future.
+ Szukasz alternatywy typu open source dla ? Ghostfolio to potężne narzędzie do zarządzania portfelem, które zapewnia osobom fizycznym kompleksową platformę do śledzenia, analizowania i optymalizacji ich inwestycji. Niezależnie od tego, czy jesteś doświadczonym inwestorem, czy dopiero zaczynasz, Ghostfolio oferuje intuicyjny interfejs użytkownika i szeroki zakres funkcjonalności, które pomogą Ci podejmować przemyślane decyzje i przejąć kontrolę nad swoją finansową przyszłością.
apps/client/src/app/pages/resources/personal-finance-tools/product-page.html
13
@@ -5103,7 +5103,7 @@
Ghostfolio is an open source software (OSS), providing a cost-effective alternative to making it particularly suitable for individuals on a tight budget, such as those pursuing Financial Independence, Retire Early (FIRE). By leveraging the collective efforts of a community of developers and personal finance enthusiasts, Ghostfolio continuously enhances its capabilities, security, and user experience.
- Ghostfolio is an open source software (OSS), providing a cost-effective alternative to making it particularly suitable for individuals on a tight budget, such as those pursuing Financial Independence, Retire Early (FIRE). By leveraging the collective efforts of a community of developers and personal finance enthusiasts, Ghostfolio continuously enhances its capabilities, security, and user experience.
+ Ghostfolio to oprogramowanie o otwartym kodzie źródłowym (OSS), stanowiące opłacalną alternatywę dla , czyniąc go szczególnie odpowiednim dla osób o ograniczonym budżecie, takich jak osoby dążące do finansowej niezależności i wcześniejszej emerytury (Financial Independence, Retire Early - FIRE). Wykorzystując wspólne wysiłki społeczności programistów i entuzjastów finansów osobistych, Ghostfolio stale zwiększa swoje możliwości, bezpieczeństwo i komfort użytkowania.
apps/client/src/app/pages/resources/personal-finance-tools/product-page.html
27
@@ -5111,7 +5111,7 @@
Let’s dive deeper into the detailed Ghostfolio vs comparison table below to gain a thorough understanding of how Ghostfolio positions itself relative to . We will explore various aspects such as features, data privacy, pricing, and more, allowing you to make a well-informed choice for your personal requirements.
- Let’s dive deeper into the detailed Ghostfolio vs comparison table below to gain a thorough understanding of how Ghostfolio positions itself relative to . We will explore various aspects such as features, data privacy, pricing, and more, allowing you to make a well-informed choice for your personal requirements.
+ Zagłębmy się w szczegółową tabelę porównawczą Ghostfolio vs poniżej, aby dokładnie zrozumieć, jak Ghostfolio pozycjonuje się w stosunku do . Przeanalizujemy różne aspekty, takie jak funkcje, prywatność danych, opłaty i inne, umożliwiając Tobie dokonanie przemyślanego wyboru pod kątem osobistych wymagań.
apps/client/src/app/pages/resources/personal-finance-tools/product-page.html
38
@@ -5119,7 +5119,7 @@
Ghostfolio vs comparison table
- Ghostfolio vs comparison table
+ Ghostfolio vs - tabela porównawcza
apps/client/src/app/pages/resources/personal-finance-tools/product-page.html
49
@@ -5127,7 +5127,7 @@
Founded
- Founded
+ Rok założenia
apps/client/src/app/pages/resources/personal-finance-tools/product-page.html
72
@@ -5135,7 +5135,7 @@
Origin
- Origin
+ Pochodzenie
apps/client/src/app/pages/resources/personal-finance-tools/product-page.html
77
@@ -5143,7 +5143,7 @@
Region
- Region
+ Region
apps/client/src/app/pages/resources/personal-finance-tools/product-page.html
82
@@ -5151,7 +5151,7 @@
Available in
- Available in
+ Dostępny w następujących językach
apps/client/src/app/pages/resources/personal-finance-tools/product-page.html
103
@@ -5159,7 +5159,7 @@
✅ Yes
- ✅ Yes
+ ✅ Tak
apps/client/src/app/pages/resources/personal-finance-tools/product-page.html
131
@@ -5195,7 +5195,7 @@
❌ No
- ❌ No
+ ❌ Nie
apps/client/src/app/pages/resources/personal-finance-tools/product-page.html
133
@@ -5227,7 +5227,7 @@
❌ No
- ❌ No
+ ❌ Nie
apps/client/src/app/pages/resources/personal-finance-tools/product-page.html
140
@@ -5235,7 +5235,7 @@
Self-Hosting
- Self-Hosting
+ Własny Hosting
apps/client/src/app/pages/resources/personal-finance-tools/product-page.html
145
@@ -5243,7 +5243,7 @@
Use anonymously
- Use anonymously
+ Korzystaj anonimowo
apps/client/src/app/pages/resources/personal-finance-tools/product-page.html
164
@@ -5251,7 +5251,7 @@
Free Plan
- Free Plan
+ Darmowy Plan
apps/client/src/app/pages/resources/personal-finance-tools/product-page.html
183
@@ -5267,7 +5267,7 @@
Please note that the information provided in the Ghostfolio vs comparison table is based on our independent research and analysis. This website is not affiliated with or any other product mentioned in the comparison. As the landscape of personal finance tools evolves, it is essential to verify any specific details or changes directly from the respective product page. Data needs a refresh? Help us maintain accurate data on GitHub.
- Please note that the information provided in the Ghostfolio vs comparison table is based on our independent research and analysis. This website is not affiliated with or any other product mentioned in the comparison. As the landscape of personal finance tools evolves, it is essential to verify any specific details or changes directly from the respective product page. Data needs a refresh? Help us maintain accurate data on GitHub.
+ Należy pamiętać, że informacje zawarte w tabeli porównawczej Ghostfolio vs są oparte na naszych niezależnych badaniach i analizach. Ta strona internetowa nie jest powiązana z ani żadnym innym produktem wymienionym w porównaniu. Ponieważ krajobraz narzędzi do finansów osobistych ewoluuje, ważne jest, aby weryfikować wszelkie szczegóły lub zmiany bezpośrednio na stronie danego produktu. Informacje wymagają aktualizacji? Pomóż nam utrzymywać dokładne dane na GitHub.
apps/client/src/app/pages/resources/personal-finance-tools/product-page.html
226
@@ -5275,7 +5275,7 @@
Ready to take your investments to the next level?
- Ready to take your investments to the next level?
+ Jesteś gotów wznieść swoje inwestycje na wyższy poziom?
apps/client/src/app/pages/resources/personal-finance-tools/product-page.html
239
@@ -5283,7 +5283,7 @@
Effortlessly track, analyze, and visualize your wealth with Ghostfolio.
- Effortlessly track, analyze, and visualize your wealth with Ghostfolio.
+ Bezproblemowo śledź, analizuj i wizualizuj swój majątek dzięki Ghostfolio.
apps/client/src/app/pages/resources/personal-finance-tools/product-page.html
243
@@ -5291,7 +5291,7 @@
Get Started
- Get Started
+ Rozpocznij
apps/client/src/app/pages/resources/personal-finance-tools/product-page.html
248
@@ -5299,7 +5299,7 @@
Personal Finance Tools
- Personal Finance Tools
+ Narzędzia do Finansów Osobistych
apps/client/src/app/pages/resources/personal-finance-tools/product-page.html
266
@@ -5307,7 +5307,7 @@
Switzerland
- Switzerland
+ Szwajcaria
apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts
60
@@ -5319,7 +5319,7 @@
Global
- Global
+ Globalny
apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts
61
@@ -5331,7 +5331,7 @@
Resources
- Resources
+ Zasoby
apps/client/src/app/pages/resources/resources-page-routing.module.ts
13
@@ -5339,7 +5339,7 @@
Guides
- Guides
+ Poradniki
apps/client/src/app/pages/resources/resources-page.html
22
@@ -5347,7 +5347,7 @@
Glossary
- Glossary
+ Słowniczek
apps/client/src/app/pages/resources/resources-page.html
124
@@ -5355,7 +5355,7 @@
Membership
- Membership
+ Członkostwo
apps/client/src/app/pages/user-account/user-account-page-routing.module.ts
23
@@ -5367,7 +5367,7 @@
Access
- Access
+ Dostęp
apps/client/src/app/pages/user-account/user-account-page-routing.module.ts
28
@@ -5379,7 +5379,7 @@
My Ghostfolio
- My Ghostfolio
+ Moje Ghostfolio
apps/client/src/app/pages/user-account/user-account-page-routing.module.ts
33
@@ -5387,7 +5387,7 @@
Oops, authentication has failed.
- Oops, authentication has failed.
+ Ups, uwierzytelnienie nie powiodło się.
apps/client/src/app/pages/webauthn/webauthn-page.html
19
@@ -5395,7 +5395,7 @@
Try again
- Try again
+ Spróbuj ponownie
apps/client/src/app/pages/webauthn/webauthn-page.html
27
@@ -5403,7 +5403,7 @@
Go back to Home Page
- Go back to Home Page
+ Wróć do Strony Głównej
apps/client/src/app/pages/webauthn/webauthn-page.html
31
@@ -5411,7 +5411,7 @@
Import Activities
- Import Activities
+ Importuj Działalności
libs/ui/src/lib/activities-table/activities-table.component.html
9
@@ -5423,7 +5423,7 @@
Import Dividends
- Import Dividends
+ Importuj Dywidendy
libs/ui/src/lib/activities-table/activities-table.component.html
29
@@ -5435,7 +5435,7 @@
Export Activities
- Export Activities
+ Eksportuj Działalności
libs/ui/src/lib/activities-table/activities-table.component.html
41
@@ -5447,7 +5447,7 @@
Export Drafts as ICS
- Export Drafts as ICS
+ Eksportuj Wersje Robocze jako ICS
libs/ui/src/lib/activities-table/activities-table.component.html
54
@@ -5459,7 +5459,7 @@
Draft
- Draft
+ Przygotuj Wstępną Wersję
libs/ui/src/lib/activities-table/activities-table.component.html
144
@@ -5467,7 +5467,7 @@
Clone
- Clone
+ Sklonuj
libs/ui/src/lib/activities-table/activities-table.component.html
435
@@ -5475,7 +5475,7 @@
Export Draft as ICS
- Export Draft as ICS
+ Eksportuj Wersję Roboczą jako ICS
libs/ui/src/lib/activities-table/activities-table.component.html
445
@@ -5483,7 +5483,7 @@
Do you really want to delete this activity?
- Do you really want to delete this activity?
+ Czy na pewno chcesz usunąć tę działalność?
libs/ui/src/lib/activities-table/activities-table.component.ts
235
@@ -5491,7 +5491,7 @@
Find holding...
- Find holding...
+ Znajdź portfel akcji...
libs/ui/src/lib/assistant/assistant.component.ts
138
@@ -5499,7 +5499,7 @@
No entries...
- No entries...
+ Brak wpisów...
libs/ui/src/lib/assistant/assistant.html
63
@@ -5519,7 +5519,7 @@
Index
- Index
+ Indeks
libs/ui/src/lib/benchmark/benchmark.component.html
3
@@ -5527,7 +5527,7 @@
Last All Time High
- Last All Time High
+ Ostatni Najwyższy Punkt w Historii
libs/ui/src/lib/benchmark/benchmark.component.html
65
@@ -5535,7 +5535,7 @@
Change from All Time High
- Change from All Time High
+ Zmiana od Najwyższego Punktu w Historii
libs/ui/src/lib/benchmark/benchmark.component.html
81
@@ -5551,7 +5551,7 @@
Market data provided by
- Market data provided by
+ Dane rynkowe dostarczone przez
libs/ui/src/lib/data-provider-credits/data-provider-credits.component.html
2
@@ -5567,7 +5567,7 @@
Annual Interest Rate
- Annual Interest Rate
+ Roczna Stopa Procentowa
libs/ui/src/lib/fire-calculator/fire-calculator.component.html
21
@@ -5583,7 +5583,7 @@
Projected Total Amount
- Projected Total Amount
+ Przewidywana Łączna Kwota
libs/ui/src/lib/fire-calculator/fire-calculator.component.html
57
@@ -5591,7 +5591,7 @@
Interest
- Interest
+ Udział
libs/ui/src/lib/fire-calculator/fire-calculator.component.ts
371
@@ -5603,7 +5603,7 @@
Savings
- Savings
+ Oszczędności
libs/ui/src/lib/fire-calculator/fire-calculator.component.ts
381
@@ -5623,7 +5623,7 @@
Show all
- Show all
+ Pokaż wszystko
libs/ui/src/lib/holdings-table/holdings-table.component.html
197
@@ -5631,7 +5631,7 @@
Account
- Account
+ Konto
libs/ui/src/lib/i18n.ts
4
@@ -5639,7 +5639,7 @@
Asia-Pacific
- Asia-Pacific
+ Azja-Pacyfik
libs/ui/src/lib/i18n.ts
5
@@ -5647,7 +5647,7 @@
Asset Class
- Asset Class
+ Rodzaj Aktywów
libs/ui/src/lib/i18n.ts
6
@@ -5655,7 +5655,7 @@
Asset Sub Class
- Asset Sub Class
+ Podklasa Aktywów
libs/ui/src/lib/i18n.ts
7
@@ -5671,7 +5671,7 @@
Switch to Ghostfolio Premium or Ghostfolio Open Source easily
- Switch to Ghostfolio Premium or Ghostfolio Open Source easily
+ Przełącz się z łatwością na Ghostfolio Premium lub Ghostfolio Open Source
libs/ui/src/lib/i18n.ts
12
@@ -5679,7 +5679,7 @@
Switch to Ghostfolio Premium easily
- Switch to Ghostfolio Premium easily
+ Przełącz się z łatwością na Ghostfolio Premium
libs/ui/src/lib/i18n.ts
13
@@ -5687,7 +5687,7 @@
Switch to Ghostfolio Open Source or Ghostfolio Basic easily
- Switch to Ghostfolio Open Source or Ghostfolio Basic easily
+ Przełącz się z łatwością na Ghostfolio Open Source lub Ghostfolio Basic
libs/ui/src/lib/i18n.ts
14
@@ -5695,7 +5695,7 @@
Emergency Fund
- Emergency Fund
+ Fundusz Rezerwowy
libs/ui/src/lib/i18n.ts
15
@@ -5711,7 +5711,7 @@
Higher Risk
- Higher Risk
+ Wyższe Ryzyko
libs/ui/src/lib/i18n.ts
18
@@ -5719,7 +5719,7 @@
This activity already exists.
- This activity already exists.
+ Ta działalność już istnieje.
libs/ui/src/lib/i18n.ts
19
@@ -5727,7 +5727,7 @@
Japan
- Japan
+ Japonia
libs/ui/src/lib/i18n.ts
83
@@ -5735,7 +5735,7 @@
Lower Risk
- Lower Risk
+ Niższe Ryzyko
libs/ui/src/lib/i18n.ts
20
@@ -5779,7 +5779,7 @@
Retirement Provision
- Retirement Provision
+ Świadczenia Emerytalne
libs/ui/src/lib/i18n.ts
25
@@ -5787,7 +5787,7 @@
Satellite
- Satellite
+ Satelita
libs/ui/src/lib/i18n.ts
26
@@ -5827,7 +5827,7 @@
Buy
- Buy
+ Zakup
libs/ui/src/lib/i18n.ts
34
@@ -5835,7 +5835,7 @@
Fee
- Fee
+ Opłata
libs/ui/src/lib/i18n.ts
36
@@ -5867,7 +5867,7 @@
Cash
- Cash
+ Gotówka
libs/ui/src/lib/i18n.ts
43
@@ -5875,7 +5875,7 @@
Commodity
- Commodity
+ Towar
libs/ui/src/lib/i18n.ts
44
@@ -5883,7 +5883,7 @@
Equity
- Equity
+ Kapitał
libs/ui/src/lib/i18n.ts
45
@@ -5891,7 +5891,7 @@
Fixed Income
- Fixed Income
+ Stały Dochód
libs/ui/src/lib/i18n.ts
46
@@ -5899,7 +5899,7 @@
Real Estate
- Real Estate
+ Nieruchomość
libs/ui/src/lib/i18n.ts
48
@@ -5907,7 +5907,7 @@
Bond
- Bond
+ Obligacja
libs/ui/src/lib/i18n.ts
51
@@ -5915,7 +5915,7 @@
Cryptocurrency
- Cryptocurrency
+ Kryptowaluta
libs/ui/src/lib/i18n.ts
52
@@ -5923,7 +5923,7 @@
ETF
- ETF
+ ETF
libs/ui/src/lib/i18n.ts
53
@@ -5931,7 +5931,7 @@
Mutual Fund
- Mutual Fund
+ Fundusz Wzajemny
libs/ui/src/lib/i18n.ts
54
@@ -5939,7 +5939,7 @@
Precious Metal
- Precious Metal
+ Metal Szlachetny
libs/ui/src/lib/i18n.ts
55
@@ -5947,7 +5947,7 @@
Private Equity
- Private Equity
+ Prywatny Kapitał
libs/ui/src/lib/i18n.ts
56
@@ -6035,7 +6035,7 @@
Membership
- Membership
+ Członkostwo
libs/ui/src/lib/membership-card/membership-card.component.html
18
@@ -6043,7 +6043,7 @@
Valid until
- Valid until
+ Ważność do
libs/ui/src/lib/membership-card/membership-card.component.html
23
@@ -6051,7 +6051,7 @@
Time to add your first activity.
- Time to add your first activity.
+ Czas dodać Twoją pierwszą działalność.
libs/ui/src/lib/no-transactions-info/no-transactions-info.component.html
12
@@ -6071,7 +6071,7 @@
50-Day Trend
- 50-Day Trend
+ 50-Dniowy Trend
libs/ui/src/lib/benchmark/benchmark.component.html
15
@@ -6079,7 +6079,7 @@
200-Day Trend
- 200-Day Trend
+ 200-Dniowy Trend
libs/ui/src/lib/benchmark/benchmark.component.html
40
@@ -6087,7 +6087,7 @@
Cash Balances
- Cash Balances
+ Salda Gotówkowe
apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html
122
@@ -6127,7 +6127,7 @@
is an invalid currency!
- is an invalid currency!
+ to nieprawidłowa waluta!
apps/client/src/app/components/admin-overview/admin-overview.component.ts
133
@@ -6143,7 +6143,7 @@
The current market price is
- The current market price is
+ Obecna cena rynkowa wynosi
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts
345
@@ -6151,7 +6151,7 @@
Test
- Test
+ Test
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html
322
@@ -6159,7 +6159,7 @@
Date Range
- Date Range
+ Zakres Dat
libs/ui/src/lib/assistant/assistant.html
93
@@ -6167,7 +6167,7 @@
Permission
- Permission
+ Pozwolenie
apps/client/src/app/components/access-table/access-table.component.html
18
@@ -6179,7 +6179,7 @@
Restricted view
- Restricted view
+ Ograniczony widok
apps/client/src/app/components/access-table/access-table.component.html
26
@@ -6207,7 +6207,7 @@
Job Queue
- Job Queue
+ Kolejka Zadań
apps/client/src/app/pages/admin/admin-page-routing.module.ts
25
@@ -6219,7 +6219,7 @@
Market data is delayed for
- Market data is delayed for
+ Dane rynkowe są opóźnione o
apps/client/src/app/components/portfolio-performance/portfolio-performance.component.ts
86
@@ -6331,7 +6331,7 @@
View
- View
+ Widok
apps/client/src/app/components/access-table/access-table.component.html
23
@@ -6351,7 +6351,7 @@
If you retire today, you would be able to withdraw per year or per month, based on your total assets of and a withdrawal rate of 4%.
- If you retire today, you would be able to withdraw per year or per month, based on your total assets of and a withdrawal rate of 4%.
+ Jeśli przejdziesz na emeryturę dzisiaj, będziesz mógł wypłacić rocznie lub miesięcznie, w oparciu o Twój łączny majątek w wysokości i stopę wypłaty w wysokości 4%.
apps/client/src/app/pages/portfolio/fire/fire-page.html
67
@@ -6383,7 +6383,7 @@
Asset Classes
- Asset Classes
+ Klasy Aktywów
libs/ui/src/lib/assistant/assistant.html
138
@@ -6407,7 +6407,7 @@
General
- General
+ Informacje Ogólne
apps/client/src/app/pages/faq/faq-page.component.ts
36
@@ -6415,7 +6415,7 @@
Cloud
- Cloud
+ Rozwiązanie w Chmurze
apps/client/src/app/pages/faq/faq-page.component.ts
41
@@ -6427,7 +6427,7 @@
Self-Hosting
- Self-Hosting
+ Własny Hosting
apps/client/src/app/pages/faq/faq-page.component.ts
47
@@ -6467,7 +6467,7 @@
My Account
- My Account
+ Moje Konto
apps/client/src/app/pages/i18n/i18n-page.html
13
@@ -6507,7 +6507,7 @@
Execute Job
- Execute Job
+ Wykonaj Zadanie
apps/client/src/app/components/admin-jobs/admin-jobs.html
174
@@ -6563,7 +6563,7 @@
Buy and sell
- Buy and sell
+ Kupno i Sprzedaż
libs/ui/src/lib/i18n.ts
8
@@ -6595,7 +6595,7 @@
Danger Zone
- Danger Zone
+ Strefa Zagrożenia
apps/client/src/app/components/user-account-settings/user-account-settings.html
244
@@ -6603,7 +6603,7 @@
Close Account
- Close Account
+ Zamknij Konto
apps/client/src/app/components/user-account-settings/user-account-settings.html
279
@@ -6619,7 +6619,7 @@
Approximation based on the top holdings of each ETF
- Approximation based on the top holdings of each ETF
+ Przybliżenie oparte na najwyższych aktywach każdego funduszu ETF
apps/client/src/app/pages/portfolio/allocations/allocations-page.html
340
@@ -6651,7 +6651,7 @@
Benchmarks
- Benchmarks
+ Punkty Odniesienia
apps/client/src/app/components/admin-market-data/admin-market-data.component.ts
80
@@ -6683,7 +6683,7 @@
Table
- Table
+ Tabela
apps/client/src/app/components/home-holdings/home-holdings.html
17
@@ -6691,7 +6691,7 @@
Chart
- Chart
+ Wykres
apps/client/src/app/components/home-holdings/home-holdings.html
20
@@ -6707,7 +6707,7 @@
Alternative
- Alternative
+ Alternatywa
apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts
83
@@ -6715,7 +6715,7 @@
App
- App
+ Aplikacja
apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts
84
@@ -6723,7 +6723,7 @@
Budgeting
- Budgeting
+ Budżetowanie
apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts
85
@@ -6731,7 +6731,7 @@
Community
- Community
+ Społeczność
apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts
86
@@ -6739,7 +6739,7 @@
Family Office
- Family Office
+ Biuro Rodzinne
apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts
87
@@ -6747,7 +6747,7 @@
Investor
- Investor
+ Inwestor
apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts
90
@@ -6755,7 +6755,7 @@
Open Source
- Open Source
+ Otwarty Kod Źródłowy
apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts
91
@@ -6763,7 +6763,7 @@
Personal Finance
- Personal Finance
+ Finanse Osobiste
apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts
93
@@ -6771,7 +6771,7 @@
Privacy
- Privacy
+ Prywatność
apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts
94
@@ -6779,7 +6779,7 @@
Software
- Software
+ Oprogramowanie
apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts
96
@@ -6787,7 +6787,7 @@
Tool
- Tool
+ Narzędzie
apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts
97
@@ -6795,7 +6795,7 @@
User Experience
- User Experience
+ Doświadczenie Użytkownika
apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts
98
@@ -6803,7 +6803,7 @@
Wealth
- Wealth
+ Majątek
apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts
99
@@ -6811,7 +6811,7 @@
Wealth Management
- Wealth Management
+ Zarządzanie Majątkiem
apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts
100
@@ -6819,7 +6819,7 @@
Australia
- Australia
+ Australia
libs/ui/src/lib/i18n.ts
72
@@ -6827,7 +6827,7 @@
Austria
- Austria
+ Austria
libs/ui/src/lib/i18n.ts
73
@@ -6835,7 +6835,7 @@
Belgium
- Belgium
+ Belgia
libs/ui/src/lib/i18n.ts
74
@@ -6843,7 +6843,7 @@
Bulgaria
- Bulgaria
+ Bułgaria
libs/ui/src/lib/i18n.ts
75
@@ -6851,7 +6851,7 @@
Canada
- Canada
+ Kanada
libs/ui/src/lib/i18n.ts
76
@@ -6859,7 +6859,7 @@
Czech Republic
- Czech Republic
+ Czechy
libs/ui/src/lib/i18n.ts
77
@@ -6867,7 +6867,7 @@
Finland
- Finland
+ Finlandia
libs/ui/src/lib/i18n.ts
78
@@ -6875,7 +6875,7 @@
France
- France
+ Francja
libs/ui/src/lib/i18n.ts
79
@@ -6883,7 +6883,7 @@
Germany
- Germany
+ Niemcy
libs/ui/src/lib/i18n.ts
80
@@ -6891,7 +6891,7 @@
India
- India
+ Indie
libs/ui/src/lib/i18n.ts
81
@@ -6899,7 +6899,7 @@
Italy
- Italy
+ Włochy
libs/ui/src/lib/i18n.ts
82
@@ -6907,7 +6907,7 @@
Netherlands
- Netherlands
+ Holandia
libs/ui/src/lib/i18n.ts
84
@@ -6915,7 +6915,7 @@
New Zealand
- New Zealand
+ Nowa Zelandia
libs/ui/src/lib/i18n.ts
85
@@ -6923,7 +6923,7 @@
Poland
- Poland
+ Polska
libs/ui/src/lib/i18n.ts
86
@@ -6931,7 +6931,7 @@
Romania
- Romania
+ Rumunia
libs/ui/src/lib/i18n.ts
87
@@ -6939,7 +6939,7 @@
South Africa
- South Africa
+ Południowa Afryka
libs/ui/src/lib/i18n.ts
88
@@ -6947,7 +6947,7 @@
Thailand
- Thailand
+ Tajlandia
libs/ui/src/lib/i18n.ts
90
@@ -6955,7 +6955,7 @@
United States
- United States
+ Stany Zjednoczone
libs/ui/src/lib/i18n.ts
91
@@ -6963,7 +6963,7 @@
Error
- Error
+ Błąd
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts
336
@@ -6971,7 +6971,7 @@
Deactivate
- Deactivate
+ Dezaktywuj
apps/client/src/app/components/rule/rule.component.html
67
@@ -6979,7 +6979,7 @@
Activate
- Activate
+ Aktywuj
apps/client/src/app/components/rule/rule.component.html
69
@@ -6987,7 +6987,7 @@
Inactive
- Inactive
+ Nieaktywny
apps/client/src/app/pages/portfolio/fire/fire-page.html
194
@@ -6995,7 +6995,7 @@
Cancel
- Cancel
+ Anuluj
libs/ui/src/lib/i18n.ts
9
@@ -7003,7 +7003,7 @@
Close
- Close
+ Zamknij
libs/ui/src/lib/i18n.ts
11
@@ -7011,7 +7011,7 @@
Yes
- Yes
+ Tak
libs/ui/src/lib/i18n.ts
31
From 0fc83486dc17c69304ea474db59c95d634f9f1ed Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Sat, 31 Aug 2024 10:57:26 +0200
Subject: [PATCH 3/9] Feature/improve redis cache (#3714)
* Improve redis cache
* Update changelog
---
CHANGELOG.md | 5 +
.../interfaces/redis-cache.interface.ts | 7 -
.../interfaces/redis-store.interface.ts | 8 -
.../src/app/redis-cache/redis-cache.module.ts | 16 +-
.../redis-cache/redis-cache.service.mock.ts | 4 +-
.../app/redis-cache/redis-cache.service.ts | 10 +-
.../configuration/configuration.service.ts | 3 +-
.../interfaces/environment.interface.ts | 1 -
package-lock.json | 220 ++++++++++++------
package.json | 8 +-
10 files changed, 176 insertions(+), 106 deletions(-)
delete mode 100644 apps/api/src/app/redis-cache/interfaces/redis-cache.interface.ts
delete mode 100644 apps/api/src/app/redis-cache/interfaces/redis-store.interface.ts
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 33705879f..fb764589e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,7 +16,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Reworked the portfolio calculator
- Exposed the log levels as an environment variable (`LOG_LEVELS`)
- Exposed the maximum of chart data items as an environment variable (`MAX_CHART_ITEMS`)
+- Changed the data format of the environment variable `CACHE_QUOTES_TTL` from seconds to milliseconds
+- Changed the data format of the environment variable `CACHE_TTL` from seconds to milliseconds
+- Removed the environment variable `MAX_ITEM_IN_CACHE`
- Improved the language localization for Polish (`pl`)
+- Migrated from `cache-manager-redis-store` to `cache-manager-redis-yet`
+- Upgraded `cache-manager` from version `3.4.3` to `5.7.6`
### Fixed
diff --git a/apps/api/src/app/redis-cache/interfaces/redis-cache.interface.ts b/apps/api/src/app/redis-cache/interfaces/redis-cache.interface.ts
deleted file mode 100644
index 194da0bc8..000000000
--- a/apps/api/src/app/redis-cache/interfaces/redis-cache.interface.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { Cache } from 'cache-manager';
-
-import type { RedisStore } from './redis-store.interface';
-
-export interface RedisCache extends Cache {
- store: RedisStore;
-}
diff --git a/apps/api/src/app/redis-cache/interfaces/redis-store.interface.ts b/apps/api/src/app/redis-cache/interfaces/redis-store.interface.ts
deleted file mode 100644
index 2ad5df485..000000000
--- a/apps/api/src/app/redis-cache/interfaces/redis-store.interface.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { Store } from 'cache-manager';
-import { createClient } from 'redis';
-
-export interface RedisStore extends Store {
- getClient: () => ReturnType;
- isCacheableValue: (value: any) => boolean;
- name: 'redis';
-}
diff --git a/apps/api/src/app/redis-cache/redis-cache.module.ts b/apps/api/src/app/redis-cache/redis-cache.module.ts
index 4b4168168..f960ad047 100644
--- a/apps/api/src/app/redis-cache/redis-cache.module.ts
+++ b/apps/api/src/app/redis-cache/redis-cache.module.ts
@@ -3,31 +3,27 @@ import { ConfigurationService } from '@ghostfolio/api/services/configuration/con
import { CacheModule } from '@nestjs/cache-manager';
import { Module } from '@nestjs/common';
-import * as redisStore from 'cache-manager-redis-store';
+import { redisStore } from 'cache-manager-redis-yet';
import type { RedisClientOptions } from 'redis';
import { RedisCacheService } from './redis-cache.service';
@Module({
+ exports: [RedisCacheService],
imports: [
- CacheModule.registerAsync({
+ CacheModule.registerAsync({
imports: [ConfigurationModule],
inject: [ConfigurationService],
useFactory: async (configurationService: ConfigurationService) => {
return {
- db: configurationService.get('REDIS_DB'),
- host: configurationService.get('REDIS_HOST'),
- max: configurationService.get('MAX_ITEM_IN_CACHE'),
- password: configurationService.get('REDIS_PASSWORD'),
- port: configurationService.get('REDIS_PORT'),
store: redisStore,
- ttl: configurationService.get('CACHE_TTL')
+ ttl: configurationService.get('CACHE_TTL'),
+ url: `redis://:${configurationService.get('REDIS_PASSWORD')}@${configurationService.get('REDIS_HOST')}:${configurationService.get('REDIS_PORT')}/${configurationService.get('REDIS_DB')}`
};
}
}),
ConfigurationModule
],
- providers: [RedisCacheService],
- exports: [RedisCacheService]
+ providers: [RedisCacheService]
})
export class RedisCacheModule {}
diff --git a/apps/api/src/app/redis-cache/redis-cache.service.mock.ts b/apps/api/src/app/redis-cache/redis-cache.service.mock.ts
index 2422e88ab..094c7e6a0 100644
--- a/apps/api/src/app/redis-cache/redis-cache.service.mock.ts
+++ b/apps/api/src/app/redis-cache/redis-cache.service.mock.ts
@@ -1,4 +1,4 @@
-import { RedisCacheService } from './redis-cache.service';
+import { Milliseconds } from 'cache-manager';
export const RedisCacheServiceMock = {
get: (key: string): Promise => {
@@ -7,7 +7,7 @@ export const RedisCacheServiceMock = {
getPortfolioSnapshotKey: (userId: string): string => {
return `portfolio-snapshot-${userId}`;
},
- set: (key: string, value: string, ttlInSeconds?: number): Promise => {
+ set: (key: string, value: string, ttl?: Milliseconds): Promise => {
return Promise.resolve(value);
}
};
diff --git a/apps/api/src/app/redis-cache/redis-cache.service.ts b/apps/api/src/app/redis-cache/redis-cache.service.ts
index 341dc4acf..c972c30a1 100644
--- a/apps/api/src/app/redis-cache/redis-cache.service.ts
+++ b/apps/api/src/app/redis-cache/redis-cache.service.ts
@@ -4,17 +4,17 @@ import { AssetProfileIdentifier, Filter } from '@ghostfolio/common/interfaces';
import { CACHE_MANAGER } from '@nestjs/cache-manager';
import { Inject, Injectable, Logger } from '@nestjs/common';
+import { Milliseconds } from 'cache-manager';
+import { RedisCache } from 'cache-manager-redis-yet';
import { createHash } from 'crypto';
-import type { RedisCache } from './interfaces/redis-cache.interface';
-
@Injectable()
export class RedisCacheService {
public constructor(
@Inject(CACHE_MANAGER) private readonly cache: RedisCache,
private readonly configurationService: ConfigurationService
) {
- const client = cache.store.getClient();
+ const client = cache.store.client;
client.on('error', (error) => {
Logger.error(error, 'RedisCacheService');
@@ -81,11 +81,11 @@ export class RedisCacheService {
return this.cache.reset();
}
- public async set(key: string, value: string, ttlInSeconds?: number) {
+ public async set(key: string, value: string, ttl?: Milliseconds) {
return this.cache.set(
key,
value,
- ttlInSeconds ?? this.configurationService.get('CACHE_TTL')
+ ttl ?? this.configurationService.get('CACHE_TTL')
);
}
}
diff --git a/apps/api/src/services/configuration/configuration.service.ts b/apps/api/src/services/configuration/configuration.service.ts
index 6a50766d2..4c5a60cce 100644
--- a/apps/api/src/services/configuration/configuration.service.ts
+++ b/apps/api/src/services/configuration/configuration.service.ts
@@ -21,7 +21,7 @@ export class ConfigurationService {
API_KEY_FINANCIAL_MODELING_PREP: str({ default: '' }),
API_KEY_OPEN_FIGI: str({ default: '' }),
API_KEY_RAPID_API: str({ default: '' }),
- CACHE_QUOTES_TTL: num({ default: ms('1 minute') / 1000 }),
+ CACHE_QUOTES_TTL: num({ default: ms('1 minute') }),
CACHE_TTL: num({ default: 1 }),
DATA_SOURCE_EXCHANGE_RATES: str({ default: DataSource.YAHOO }),
DATA_SOURCE_IMPORT: str({ default: DataSource.YAHOO }),
@@ -43,7 +43,6 @@ export class ConfigurationService {
JWT_SECRET_KEY: str({}),
MAX_ACTIVITIES_TO_IMPORT: num({ default: Number.MAX_SAFE_INTEGER }),
MAX_CHART_ITEMS: num({ default: 365 }),
- MAX_ITEM_IN_CACHE: num({ default: 9999 }),
PORT: port({ default: 3333 }),
REDIS_DB: num({ default: 0 }),
REDIS_HOST: str({ default: 'localhost' }),
diff --git a/apps/api/src/services/interfaces/environment.interface.ts b/apps/api/src/services/interfaces/environment.interface.ts
index c0dfb1806..d07937787 100644
--- a/apps/api/src/services/interfaces/environment.interface.ts
+++ b/apps/api/src/services/interfaces/environment.interface.ts
@@ -29,7 +29,6 @@ export interface Environment extends CleanedEnvAccessors {
JWT_SECRET_KEY: string;
MAX_ACTIVITIES_TO_IMPORT: number;
MAX_CHART_ITEMS: number;
- MAX_ITEM_IN_CACHE: number;
PORT: number;
REDIS_DB: number;
REDIS_HOST: string;
diff --git a/package-lock.json b/package-lock.json
index aa7ff4681..2938d915b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "ghostfolio",
- "version": "2.103.0",
+ "version": "2.106.0-beta.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "ghostfolio",
- "version": "2.103.0",
+ "version": "2.106.0-beta.3",
"hasInstallScript": true,
"license": "AGPL-3.0",
"dependencies": {
@@ -30,7 +30,7 @@
"@dinero.js/currencies": "2.0.0-alpha.8",
"@internationalized/number": "3.5.2",
"@nestjs/bull": "10.0.1",
- "@nestjs/cache-manager": "2.1.0",
+ "@nestjs/cache-manager": "2.2.2",
"@nestjs/common": "10.1.3",
"@nestjs/config": "3.0.0",
"@nestjs/core": "10.1.3",
@@ -49,8 +49,8 @@
"body-parser": "1.20.2",
"bootstrap": "4.6.0",
"bull": "4.10.4",
- "cache-manager": "3.4.3",
- "cache-manager-redis-store": "2.0.0",
+ "cache-manager": "5.7.6",
+ "cache-manager-redis-yet": "5.1.4",
"chart.js": "4.2.0",
"chartjs-adapter-date-fns": "3.0.0",
"chartjs-chart-treemap": "2.3.1",
@@ -126,7 +126,7 @@
"@trivago/prettier-plugin-sort-imports": "4.3.0",
"@types/big.js": "6.2.2",
"@types/body-parser": "1.19.5",
- "@types/cache-manager": "3.4.2",
+ "@types/cache-manager": "4.0.6",
"@types/color": "3.0.6",
"@types/google-spreadsheet": "3.1.5",
"@types/jest": "29.4.4",
@@ -6800,14 +6800,14 @@
"integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ=="
},
"node_modules/@nestjs/cache-manager": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/@nestjs/cache-manager/-/cache-manager-2.1.0.tgz",
- "integrity": "sha512-9kep3a8Mq5cMuXN/anGhSYc0P48CRBXk5wyJJRBFxhNkCH8AIzZF4CASGVDIEMmm3OjVcEUHojjyJwCODS17Qw==",
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/@nestjs/cache-manager/-/cache-manager-2.2.2.tgz",
+ "integrity": "sha512-+n7rpU1QABeW2WV17Dl1vZCG3vWjJU1MaamWgZvbGxYE9EeCM0lVLfw3z7acgDTNwOy+K68xuQPoIMxD0bhjlA==",
+ "license": "MIT",
"peerDependencies": {
"@nestjs/common": "^9.0.0 || ^10.0.0",
"@nestjs/core": "^9.0.0 || ^10.0.0",
"cache-manager": "<=5",
- "reflect-metadata": "^0.1.12",
"rxjs": "^7.0.0"
}
},
@@ -9708,6 +9708,71 @@
"@prisma/debug": "5.18.0"
}
},
+ "node_modules/@redis/bloom": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@redis/bloom/-/bloom-1.2.0.tgz",
+ "integrity": "sha512-HG2DFjYKbpNmVXsa0keLHp/3leGJz1mjh09f2RLGGLQZzSHpkmZWuwJbAvo3QcRY8p80m5+ZdXZdYOSBLlp7Cg==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@redis/client": "^1.0.0"
+ }
+ },
+ "node_modules/@redis/client": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/@redis/client/-/client-1.6.0.tgz",
+ "integrity": "sha512-aR0uffYI700OEEH4gYnitAnv3vzVGXCFvYfdpu/CJKvk4pHfLPEy/JSZyrpQ+15WhXe1yJRXLtfQ84s4mEXnPg==",
+ "license": "MIT",
+ "dependencies": {
+ "cluster-key-slot": "1.1.2",
+ "generic-pool": "3.9.0",
+ "yallist": "4.0.0"
+ },
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/@redis/client/node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "license": "ISC"
+ },
+ "node_modules/@redis/graph": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@redis/graph/-/graph-1.1.1.tgz",
+ "integrity": "sha512-FEMTcTHZozZciLRl6GiiIB4zGm5z5F3F6a6FZCyrfxdKOhFlGkiAqlexWMBzCi4DcRoyiOsuLfW+cjlGWyExOw==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@redis/client": "^1.0.0"
+ }
+ },
+ "node_modules/@redis/json": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/@redis/json/-/json-1.0.7.tgz",
+ "integrity": "sha512-6UyXfjVaTBTJtKNG4/9Z8PSpKE6XgSyEb8iwaqDcy+uKrd/DGYHTWkUdnQDyzm727V7p21WUMhsqz5oy65kPcQ==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@redis/client": "^1.0.0"
+ }
+ },
+ "node_modules/@redis/search": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@redis/search/-/search-1.2.0.tgz",
+ "integrity": "sha512-tYoDBbtqOVigEDMAcTGsRlMycIIjwMCgD8eR2t0NANeQmgK/lvxNAvYyb6bZDD4frHRhIHkJu2TBRvB0ERkOmw==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@redis/client": "^1.0.0"
+ }
+ },
+ "node_modules/@redis/time-series": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@redis/time-series/-/time-series-1.1.0.tgz",
+ "integrity": "sha512-c1Q99M5ljsIuc4YdaCwfUEXsofakb9c8+Zse2qxTadu8TalLXuAESzLvFAvNVbkmSlvlzIQOLpBCmWI9wTOt+g==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@redis/client": "^1.0.0"
+ }
+ },
"node_modules/@rollup/rollup-android-arm-eabi": {
"version": "4.19.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.19.1.tgz",
@@ -11468,10 +11533,11 @@
}
},
"node_modules/@types/cache-manager": {
- "version": "3.4.2",
- "resolved": "https://registry.npmjs.org/@types/cache-manager/-/cache-manager-3.4.2.tgz",
- "integrity": "sha512-1IwA74t5ID4KWo0Kndal16MhiPSZgMe1fGc+MLT6j5r+Ab7jku36PFTl4PP6MiWw0BJscM9QpZEo00qixNQoRg==",
- "dev": true
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/@types/cache-manager/-/cache-manager-4.0.6.tgz",
+ "integrity": "sha512-8qL93MF05/xrzFm/LSPtzNEOE1eQF3VwGHAcQEylgp5hDSTe41jtFwbSYAPfyYcVa28y1vYSjIt0c1fLLUiC/Q==",
+ "dev": true,
+ "license": "MIT"
},
"node_modules/@types/cacheable-request": {
"version": "6.0.3",
@@ -13255,7 +13321,8 @@
"node_modules/async": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz",
- "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw=="
+ "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==",
+ "dev": true
},
"node_modules/asynckit": {
"version": "0.4.0",
@@ -14243,41 +14310,50 @@
}
},
"node_modules/cache-manager": {
- "version": "3.4.3",
- "resolved": "https://registry.npmjs.org/cache-manager/-/cache-manager-3.4.3.tgz",
- "integrity": "sha512-6+Hfzy1SNs/thUwo+07pV0ozgxc4sadrAN0eFVGvXl/X9nz3J0BqEnnEoyxEn8jnF+UkEo0MKpyk9BO80hMeiQ==",
- "dependencies": {
- "async": "3.2.0",
- "lodash": "^4.17.21",
- "lru-cache": "6.0.0"
- }
- },
- "node_modules/cache-manager-redis-store": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/cache-manager-redis-store/-/cache-manager-redis-store-2.0.0.tgz",
- "integrity": "sha512-bWLWlUg6nCYHiJLCCYxY2MgvwvKnvlWwrbuynrzpjEIhfArD2GC9LtutIHFEPeyGVQN6C+WEw+P3r+BFBwhswg==",
+ "version": "5.7.6",
+ "resolved": "https://registry.npmjs.org/cache-manager/-/cache-manager-5.7.6.tgz",
+ "integrity": "sha512-wBxnBHjDxF1RXpHCBD6HGvKER003Ts7IIm0CHpggliHzN1RZditb7rXoduE1rplc2DEFYKxhLKgFuchXMJje9w==",
+ "license": "MIT",
"dependencies": {
- "redis": "^3.0.2"
+ "eventemitter3": "^5.0.1",
+ "lodash.clonedeep": "^4.5.0",
+ "lru-cache": "^10.2.2",
+ "promise-coalesce": "^1.1.2"
},
"engines": {
- "node": ">= 8.3"
+ "node": ">= 18"
}
},
- "node_modules/cache-manager/node_modules/lru-cache": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
- "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "node_modules/cache-manager-redis-yet": {
+ "version": "5.1.4",
+ "resolved": "https://registry.npmjs.org/cache-manager-redis-yet/-/cache-manager-redis-yet-5.1.4.tgz",
+ "integrity": "sha512-2mXZjo+txfH2m+mSTHTITNq8c5SssU2nP7NutzrocO3Mw/SbjHcDo+mriI3ZuR63ov/oUUIaF9iF+MzDqVzMoQ==",
+ "license": "MIT",
"dependencies": {
- "yallist": "^4.0.0"
+ "@redis/bloom": "^1.2.0",
+ "@redis/client": "^1.6.0",
+ "@redis/graph": "^1.1.1",
+ "@redis/json": "^1.0.7",
+ "@redis/search": "^1.2.0",
+ "@redis/time-series": "^1.1.0",
+ "cache-manager": "^5.7.6",
+ "redis": "^4.7.0"
},
"engines": {
- "node": ">=10"
+ "node": ">= 18"
}
},
- "node_modules/cache-manager/node_modules/yallist": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
+ "node_modules/cache-manager/node_modules/eventemitter3": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz",
+ "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==",
+ "license": "MIT"
+ },
+ "node_modules/cache-manager/node_modules/lru-cache": {
+ "version": "10.4.3",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz",
+ "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==",
+ "license": "ISC"
},
"node_modules/cacheable-lookup": {
"version": "5.0.4",
@@ -19466,6 +19542,15 @@
"node": ">=10"
}
},
+ "node_modules/generic-pool": {
+ "version": "3.9.0",
+ "resolved": "https://registry.npmjs.org/generic-pool/-/generic-pool-3.9.0.tgz",
+ "integrity": "sha512-hymDOu5B53XvN4QT9dBmZxPX4CWhBPPLguTZ9MMFeFa/Kg0xWVfylOVNlJji/E7yTZWFd/q9GO5TxDLq156D7g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4"
+ }
+ },
"node_modules/gensync": {
"version": "1.0.0-beta.2",
"resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
@@ -24555,6 +24640,12 @@
"integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==",
"optional": true
},
+ "node_modules/lodash.clonedeep": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
+ "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==",
+ "license": "MIT"
+ },
"node_modules/lodash.clonedeepwith": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.clonedeepwith/-/lodash.clonedeepwith-4.5.0.tgz",
@@ -28785,6 +28876,15 @@
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
},
+ "node_modules/promise-coalesce": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/promise-coalesce/-/promise-coalesce-1.1.2.tgz",
+ "integrity": "sha512-zLaJ9b8hnC564fnJH6NFSOGZYYdzrAJn2JUUIwzoQb32fG2QAakpDNM+CZo1km6keXkRXRM+hml1BFAPVnPkxg==",
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=16"
+ }
+ },
"node_modules/promise-inflight": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz",
@@ -29125,28 +29225,22 @@
}
},
"node_modules/redis": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/redis/-/redis-3.1.2.tgz",
- "integrity": "sha512-grn5KoZLr/qrRQVwoSkmzdbw6pwF+/rwODtrOr6vuBRiR/f3rjSTGupbF90Zpqm2oenix8Do6RV7pYEkGwlKkw==",
+ "version": "4.7.0",
+ "resolved": "https://registry.npmjs.org/redis/-/redis-4.7.0.tgz",
+ "integrity": "sha512-zvmkHEAdGMn+hMRXuMBtu4Vo5P6rHQjLoHftu+lBqq8ZTA3RCVC/WzD790bkKKiNFp7d5/9PcSD19fJyyRvOdQ==",
+ "license": "MIT",
+ "workspaces": [
+ "./packages/*"
+ ],
"dependencies": {
- "denque": "^1.5.0",
- "redis-commands": "^1.7.0",
- "redis-errors": "^1.2.0",
- "redis-parser": "^3.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/node-redis"
+ "@redis/bloom": "1.2.0",
+ "@redis/client": "1.6.0",
+ "@redis/graph": "1.1.1",
+ "@redis/json": "1.0.7",
+ "@redis/search": "1.2.0",
+ "@redis/time-series": "1.1.0"
}
},
- "node_modules/redis-commands": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.7.0.tgz",
- "integrity": "sha512-nJWqw3bTFy21hX/CPKHth6sfhZbdiHP6bTawSgQBlKOVRG7EZkfHbbHwQJnrE4vsQf0CMNE+3gJ4Fmm16vdVlQ=="
- },
"node_modules/redis-errors": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz",
@@ -29166,14 +29260,6 @@
"node": ">=4"
}
},
- "node_modules/redis/node_modules/denque": {
- "version": "1.5.1",
- "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.1.tgz",
- "integrity": "sha512-XwE+iZ4D6ZUB7mfYRMb5wByE8L74HCn30FBN7sWnXksWc1LO1bPDl67pBR9o/kC4z/xSNAwkMYcGgqDV3BE3Hw==",
- "engines": {
- "node": ">=0.10"
- }
- },
"node_modules/reflect-metadata": {
"version": "0.1.13",
"resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz",
diff --git a/package.json b/package.json
index ef43a39a2..f44dae34e 100644
--- a/package.json
+++ b/package.json
@@ -74,7 +74,7 @@
"@dinero.js/currencies": "2.0.0-alpha.8",
"@internationalized/number": "3.5.2",
"@nestjs/bull": "10.0.1",
- "@nestjs/cache-manager": "2.1.0",
+ "@nestjs/cache-manager": "2.2.2",
"@nestjs/common": "10.1.3",
"@nestjs/config": "3.0.0",
"@nestjs/core": "10.1.3",
@@ -93,8 +93,8 @@
"body-parser": "1.20.2",
"bootstrap": "4.6.0",
"bull": "4.10.4",
- "cache-manager": "3.4.3",
- "cache-manager-redis-store": "2.0.0",
+ "cache-manager": "5.7.6",
+ "cache-manager-redis-yet": "5.1.4",
"chart.js": "4.2.0",
"chartjs-adapter-date-fns": "3.0.0",
"chartjs-chart-treemap": "2.3.1",
@@ -170,7 +170,7 @@
"@trivago/prettier-plugin-sort-imports": "4.3.0",
"@types/big.js": "6.2.2",
"@types/body-parser": "1.19.5",
- "@types/cache-manager": "3.4.2",
+ "@types/cache-manager": "4.0.6",
"@types/color": "3.0.6",
"@types/google-spreadsheet": "3.1.5",
"@types/jest": "29.4.4",
From e4ba27850d625a4e5442363b7c557ff579c5aed2 Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Sat, 31 Aug 2024 14:29:45 +0200
Subject: [PATCH 4/9] Feature/upgrade prisma to version 5.19.0 (#3715)
* Upgrade prisma to version 5.19.0
* Update changelog
---
CHANGELOG.md | 1 +
package-lock.json | 67 +++++++++++++++++++++++++----------------------
package.json | 4 +--
3 files changed, 38 insertions(+), 34 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fb764589e..f68d1aad8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Improved the language localization for Polish (`pl`)
- Migrated from `cache-manager-redis-store` to `cache-manager-redis-yet`
- Upgraded `cache-manager` from version `3.4.3` to `5.7.6`
+- Upgraded `prisma` from version `5.18.0` to `5.19.0`
### Fixed
diff --git a/package-lock.json b/package-lock.json
index 2938d915b..fbb54d4e2 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -40,7 +40,7 @@
"@nestjs/platform-express": "10.1.3",
"@nestjs/schedule": "3.0.2",
"@nestjs/serve-static": "4.0.0",
- "@prisma/client": "5.18.0",
+ "@prisma/client": "5.19.0",
"@simplewebauthn/browser": "9.0.1",
"@simplewebauthn/server": "9.0.3",
"@stripe/stripe-js": "3.5.0",
@@ -84,7 +84,7 @@
"passport": "0.7.0",
"passport-google-oauth20": "2.0.0",
"passport-jwt": "4.0.1",
- "prisma": "5.18.0",
+ "prisma": "5.19.0",
"reflect-metadata": "0.1.13",
"rxjs": "7.5.6",
"stripe": "15.11.0",
@@ -9646,9 +9646,9 @@
"dev": true
},
"node_modules/@prisma/client": {
- "version": "5.18.0",
- "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.18.0.tgz",
- "integrity": "sha512-BWivkLh+af1kqC89zCJYkHsRcyWsM8/JHpsDMM76DjP3ZdEquJhXa4IeX+HkWPnwJ5FanxEJFZZDTWiDs/Kvyw==",
+ "version": "5.19.0",
+ "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.19.0.tgz",
+ "integrity": "sha512-CzOpau+q1kEWQyoQMvlnXIHqPvwmWbh48xZ4n8KWbAql0p8PC0BIgSTYW5ncxXa4JSEff0tcoxSZB874wDstdg==",
"hasInstallScript": true,
"license": "Apache-2.0",
"engines": {
@@ -9664,48 +9664,48 @@
}
},
"node_modules/@prisma/debug": {
- "version": "5.18.0",
- "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.18.0.tgz",
- "integrity": "sha512-f+ZvpTLidSo3LMJxQPVgAxdAjzv5OpzAo/eF8qZqbwvgi2F5cTOI9XCpdRzJYA0iGfajjwjOKKrVq64vkxEfUw==",
+ "version": "5.19.0",
+ "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.19.0.tgz",
+ "integrity": "sha512-+b/G0ubAZlrS+JSiDhXnYV5DF/aTJ3pinktkiV/L4TtLRLZO6SVGyFELgxBsicCTWJ2ZMu5vEV/jTtYCdjFTRA==",
"license": "Apache-2.0"
},
"node_modules/@prisma/engines": {
- "version": "5.18.0",
- "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.18.0.tgz",
- "integrity": "sha512-ofmpGLeJ2q2P0wa/XaEgTnX/IsLnvSp/gZts0zjgLNdBhfuj2lowOOPmDcfKljLQUXMvAek3lw5T01kHmCG8rg==",
+ "version": "5.19.0",
+ "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.19.0.tgz",
+ "integrity": "sha512-UtW+0m4HYoRSSR3LoDGKF3Ud4BSMWYlLEt4slTnuP1mI+vrV3zaDoiAPmejdAT76vCN5UqnWURbkXxf66nSylQ==",
"hasInstallScript": true,
"license": "Apache-2.0",
"dependencies": {
- "@prisma/debug": "5.18.0",
- "@prisma/engines-version": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169",
- "@prisma/fetch-engine": "5.18.0",
- "@prisma/get-platform": "5.18.0"
+ "@prisma/debug": "5.19.0",
+ "@prisma/engines-version": "5.19.0-31.5fe21811a6ba0b952a3bc71400666511fe3b902f",
+ "@prisma/fetch-engine": "5.19.0",
+ "@prisma/get-platform": "5.19.0"
}
},
"node_modules/@prisma/engines-version": {
- "version": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169",
- "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169.tgz",
- "integrity": "sha512-a/+LpJj8vYU3nmtkg+N3X51ddbt35yYrRe8wqHTJtYQt7l1f8kjIBcCs6sHJvodW/EK5XGvboOiwm47fmNrbgg==",
+ "version": "5.19.0-31.5fe21811a6ba0b952a3bc71400666511fe3b902f",
+ "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.19.0-31.5fe21811a6ba0b952a3bc71400666511fe3b902f.tgz",
+ "integrity": "sha512-GimI9aZIFy/yvvR11KfXRn3pliFn1QAkdebVlsXlnoh5uk0YhLblVmeYiHfsu+wDA7BeKqYT4sFfzg8mutzuWw==",
"license": "Apache-2.0"
},
"node_modules/@prisma/fetch-engine": {
- "version": "5.18.0",
- "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.18.0.tgz",
- "integrity": "sha512-I/3u0x2n31rGaAuBRx2YK4eB7R/1zCuayo2DGwSpGyrJWsZesrV7QVw7ND0/Suxeo/vLkJ5OwuBqHoCxvTHpOg==",
+ "version": "5.19.0",
+ "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.19.0.tgz",
+ "integrity": "sha512-oOiPNtmJX0cP/ebu7BBEouJvCw8T84/MFD/Hf2zlqjxkK4ojl38bB9i9J5LAxotL6WlYVThKdxc7HqoWnPOhqQ==",
"license": "Apache-2.0",
"dependencies": {
- "@prisma/debug": "5.18.0",
- "@prisma/engines-version": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169",
- "@prisma/get-platform": "5.18.0"
+ "@prisma/debug": "5.19.0",
+ "@prisma/engines-version": "5.19.0-31.5fe21811a6ba0b952a3bc71400666511fe3b902f",
+ "@prisma/get-platform": "5.19.0"
}
},
"node_modules/@prisma/get-platform": {
- "version": "5.18.0",
- "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.18.0.tgz",
- "integrity": "sha512-Tk+m7+uhqcKDgnMnFN0lRiH7Ewea0OEsZZs9pqXa7i3+7svS3FSCqDBCaM9x5fmhhkufiG0BtunJVDka+46DlA==",
+ "version": "5.19.0",
+ "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.19.0.tgz",
+ "integrity": "sha512-s9DWkZKnuP4Y8uy6yZfvqQ/9X3/+2KYf3IZUVZz5OstJdGBJrBlbmIuMl81917wp5TuK/1k2TpHNCEdpYLPKmg==",
"license": "Apache-2.0",
"dependencies": {
- "@prisma/debug": "5.18.0"
+ "@prisma/debug": "5.19.0"
}
},
"node_modules/@redis/bloom": {
@@ -28829,19 +28829,22 @@
}
},
"node_modules/prisma": {
- "version": "5.18.0",
- "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.18.0.tgz",
- "integrity": "sha512-+TrSIxZsh64OPOmaSgVPH7ALL9dfU0jceYaMJXsNrTkFHO7/3RANi5K2ZiPB1De9+KDxCWn7jvRq8y8pvk+o9g==",
+ "version": "5.19.0",
+ "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.19.0.tgz",
+ "integrity": "sha512-Pu7lUKpVyTx8cVwM26dYh8NdvMOkMnJXzE8L6cikFuR4JwyMU5NKofQkWyxJKlTT4fNjmcnibTvklV8oVMrn+g==",
"hasInstallScript": true,
"license": "Apache-2.0",
"dependencies": {
- "@prisma/engines": "5.18.0"
+ "@prisma/engines": "5.19.0"
},
"bin": {
"prisma": "build/index.js"
},
"engines": {
"node": ">=16.13"
+ },
+ "optionalDependencies": {
+ "fsevents": "2.3.3"
}
},
"node_modules/prismjs": {
diff --git a/package.json b/package.json
index f44dae34e..9eb00e3c4 100644
--- a/package.json
+++ b/package.json
@@ -84,7 +84,7 @@
"@nestjs/platform-express": "10.1.3",
"@nestjs/schedule": "3.0.2",
"@nestjs/serve-static": "4.0.0",
- "@prisma/client": "5.18.0",
+ "@prisma/client": "5.19.0",
"@simplewebauthn/browser": "9.0.1",
"@simplewebauthn/server": "9.0.3",
"@stripe/stripe-js": "3.5.0",
@@ -128,7 +128,7 @@
"passport": "0.7.0",
"passport-google-oauth20": "2.0.0",
"passport-jwt": "4.0.1",
- "prisma": "5.18.0",
+ "prisma": "5.19.0",
"reflect-metadata": "0.1.13",
"rxjs": "7.5.6",
"stripe": "15.11.0",
From c6f804f68c419571abee3d1d02787aa54864f0bc Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Sat, 31 Aug 2024 16:11:18 +0200
Subject: [PATCH 5/9] Feature/Improve redis cache part 2 (#3716)
* Set ttl to 0
---
apps/api/src/app/benchmark/benchmark.service.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/api/src/app/benchmark/benchmark.service.ts b/apps/api/src/app/benchmark/benchmark.service.ts
index 169ea8cad..6cb375e0f 100644
--- a/apps/api/src/app/benchmark/benchmark.service.ts
+++ b/apps/api/src/app/benchmark/benchmark.service.ts
@@ -443,7 +443,7 @@ export class BenchmarkService {
benchmarks,
expiration: expiration.getTime()
}),
- ms('12 hours') / 1000
+ 0
);
}
From 71a568264d8933ca9befe1d4563b1b0b046faea9 Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Sat, 31 Aug 2024 16:11:52 +0200
Subject: [PATCH 6/9] Feature/improve portfolio snapshot caching (#3717)
* Improve portfolio snapshot caching
* Update changelog
---
CHANGELOG.md | 1 +
.../calculator/portfolio-calculator.ts | 74 ++++++++++++++-----
.../interfaces/snapshot-value.interface.ts | 4 +
3 files changed, 60 insertions(+), 19 deletions(-)
create mode 100644 apps/api/src/app/portfolio/interfaces/snapshot-value.interface.ts
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f68d1aad8..cbfcfa2f2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Reworked the portfolio calculator
+- Improved the caching of the portfolio snapshot in the portfolio calculator by returning cached data and recalculating in the background when it expires
- Exposed the log levels as an environment variable (`LOG_LEVELS`)
- Exposed the maximum of chart data items as an environment variable (`MAX_CHART_ITEMS`)
- Changed the data format of the environment variable `CACHE_QUOTES_TTL` from seconds to milliseconds
diff --git a/apps/api/src/app/portfolio/calculator/portfolio-calculator.ts b/apps/api/src/app/portfolio/calculator/portfolio-calculator.ts
index 0fcb8b9d6..5384fd6d8 100644
--- a/apps/api/src/app/portfolio/calculator/portfolio-calculator.ts
+++ b/apps/api/src/app/portfolio/calculator/portfolio-calculator.ts
@@ -1,6 +1,7 @@
import { Activity } from '@ghostfolio/api/app/order/interfaces/activities.interface';
import { CurrentRateService } from '@ghostfolio/api/app/portfolio/current-rate.service';
import { PortfolioOrder } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-order.interface';
+import { PortfolioSnapshotValue } from '@ghostfolio/api/app/portfolio/interfaces/snapshot-value.interface';
import { TransactionPointSymbol } from '@ghostfolio/api/app/portfolio/interfaces/transaction-point-symbol.interface';
import { TransactionPoint } from '@ghostfolio/api/app/portfolio/interfaces/transaction-point.interface';
import { RedisCacheService } from '@ghostfolio/api/app/redis-cache/redis-cache.service';
@@ -32,6 +33,7 @@ import { Logger } from '@nestjs/common';
import { Big } from 'big.js';
import { plainToClass } from 'class-transformer';
import {
+ addMilliseconds,
differenceInDays,
eachDayOfInterval,
endOfDay,
@@ -863,6 +865,29 @@ export abstract class PortfolioCalculator {
return chartDateMap;
}
+ private async computeAndCacheSnapshot() {
+ const snapshot = await this.computeSnapshot();
+
+ const expiration = addMilliseconds(
+ new Date(),
+ this.configurationService.get('CACHE_QUOTES_TTL')
+ );
+
+ this.redisCacheService.set(
+ this.redisCacheService.getPortfolioSnapshotKey({
+ filters: this.filters,
+ userId: this.userId
+ }),
+ JSON.stringify(({
+ expiration: expiration.getTime(),
+ portfolioSnapshot: snapshot
+ })),
+ 0
+ );
+
+ return snapshot;
+ }
+
@LogPerformance
private computeTransactionPoints() {
this.transactionPoints = [];
@@ -1006,19 +1031,33 @@ export abstract class PortfolioCalculator {
private async initialize() {
const startTimeTotal = performance.now();
- const cachedSnapshot = await this.redisCacheService.get(
- this.redisCacheService.getPortfolioSnapshotKey({
- filters: this.filters,
- userId: this.userId
- })
- );
+ let cachedPortfolioSnapshot: PortfolioSnapshot;
+ let isCachedPortfolioSnapshotExpired = false;
+
+ try {
+ const cachedPortfolioSnapshotValue = await this.redisCacheService.get(
+ this.redisCacheService.getPortfolioSnapshotKey({
+ filters: this.filters,
+ userId: this.userId
+ })
+ );
+
+ const { expiration, portfolioSnapshot }: PortfolioSnapshotValue =
+ JSON.parse(cachedPortfolioSnapshotValue);
- if (cachedSnapshot) {
- this.snapshot = plainToClass(
+ cachedPortfolioSnapshot = plainToClass(
PortfolioSnapshot,
- JSON.parse(cachedSnapshot)
+ portfolioSnapshot
);
+ if (isAfter(new Date(), new Date(expiration))) {
+ isCachedPortfolioSnapshotExpired = true;
+ }
+ } catch {}
+
+ if (cachedPortfolioSnapshot) {
+ this.snapshot = cachedPortfolioSnapshot;
+
Logger.debug(
`Fetched portfolio snapshot from cache in ${(
(performance.now() - startTimeTotal) /
@@ -1026,17 +1065,14 @@ export abstract class PortfolioCalculator {
).toFixed(3)} seconds`,
'PortfolioCalculator'
);
- } else {
- this.snapshot = await this.computeSnapshot();
- this.redisCacheService.set(
- this.redisCacheService.getPortfolioSnapshotKey({
- filters: this.filters,
- userId: this.userId
- }),
- JSON.stringify(this.snapshot),
- this.configurationService.get('CACHE_QUOTES_TTL')
- );
+ if (isCachedPortfolioSnapshotExpired) {
+ // Compute in the background
+ this.computeAndCacheSnapshot();
+ }
+ } else {
+ // Wait for computation
+ this.snapshot = await this.computeAndCacheSnapshot();
}
}
}
diff --git a/apps/api/src/app/portfolio/interfaces/snapshot-value.interface.ts b/apps/api/src/app/portfolio/interfaces/snapshot-value.interface.ts
new file mode 100644
index 000000000..3d205416c
--- /dev/null
+++ b/apps/api/src/app/portfolio/interfaces/snapshot-value.interface.ts
@@ -0,0 +1,4 @@
+export interface PortfolioSnapshotValue {
+ expiration: number;
+ portfolioSnapshot: string;
+}
From 5358f13e934a3d20f7b24a7a949d9de8c421e96f Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Sat, 31 Aug 2024 16:13:56 +0200
Subject: [PATCH 7/9] Release 2.106.0-beta.4 (#3719)
---
CHANGELOG.md | 2 +-
package.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cbfcfa2f2..d7dfcb740 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-## 2.106.0-beta.3 - 2024-08-28
+## 2.106.0-beta.4 - 2024-08-31
### Added
diff --git a/package.json b/package.json
index 9eb00e3c4..eb7c3532f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "ghostfolio",
- "version": "2.106.0-beta.3",
+ "version": "2.106.0-beta.4",
"homepage": "https://ghostfol.io",
"license": "AGPL-3.0",
"repository": "https://github.com/ghostfolio/ghostfolio",
From adcddae44eeff2a6e413b6f4f86a1cf5bc31cf7c Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Sat, 31 Aug 2024 16:49:05 +0200
Subject: [PATCH 8/9] Encode redis password (#3720)
---
apps/api/src/app/redis-cache/redis-cache.module.ts | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/apps/api/src/app/redis-cache/redis-cache.module.ts b/apps/api/src/app/redis-cache/redis-cache.module.ts
index f960ad047..a507479b9 100644
--- a/apps/api/src/app/redis-cache/redis-cache.module.ts
+++ b/apps/api/src/app/redis-cache/redis-cache.module.ts
@@ -15,10 +15,14 @@ import { RedisCacheService } from './redis-cache.service';
imports: [ConfigurationModule],
inject: [ConfigurationService],
useFactory: async (configurationService: ConfigurationService) => {
+ const redisPassword = encodeURIComponent(
+ configurationService.get('REDIS_PASSWORD')
+ );
+
return {
store: redisStore,
ttl: configurationService.get('CACHE_TTL'),
- url: `redis://:${configurationService.get('REDIS_PASSWORD')}@${configurationService.get('REDIS_HOST')}:${configurationService.get('REDIS_PORT')}/${configurationService.get('REDIS_DB')}`
+ url: `redis://${redisPassword ? `:${redisPassword}` : ''}@${configurationService.get('REDIS_HOST')}:${configurationService.get('REDIS_PORT')}/${configurationService.get('REDIS_DB')}`
};
}
}),
From 676be076c3b98321f6b3617e9b3f5d13f5d6844a Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Sat, 31 Aug 2024 16:50:25 +0200
Subject: [PATCH 9/9] Release 2.106.0-beta.5 (#3721)
---
CHANGELOG.md | 2 +-
package.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d7dfcb740..25cae43aa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-## 2.106.0-beta.4 - 2024-08-31
+## 2.106.0-beta.5 - 2024-08-31
### Added
diff --git a/package.json b/package.json
index eb7c3532f..e66dc3a3f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "ghostfolio",
- "version": "2.106.0-beta.4",
+ "version": "2.106.0-beta.5",
"homepage": "https://ghostfol.io",
"license": "AGPL-3.0",
"repository": "https://github.com/ghostfolio/ghostfolio",