project setup with core files including configuration, package management, and basic structure. Added .gitignore, README, and various TypeScript types for CMS components. Implemented initial components and layouts for the application.
This commit is contained in:
33
middlelayer/utils/cacheKeys.ts
Normal file
33
middlelayer/utils/cacheKeys.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Zentralisierte Cache-Key-Generierung
|
||||
* Stellt sicher, dass Cache-Keys konsistent und wartbar sind
|
||||
*/
|
||||
export class CacheKeyBuilder {
|
||||
static page(slug: string, locale?: string): string {
|
||||
return `page:${slug}:${locale || "default"}`;
|
||||
}
|
||||
|
||||
static pages(locale?: string): string {
|
||||
return `pages:all:${locale || "default"}`;
|
||||
}
|
||||
|
||||
static pageSeo(locale?: string): string {
|
||||
return `pageSeo:${locale || "default"}`;
|
||||
}
|
||||
|
||||
static navigation(locale?: string): string {
|
||||
return `navigation:${locale || "default"}`;
|
||||
}
|
||||
|
||||
static product(id: string): string {
|
||||
return `product:${id}`;
|
||||
}
|
||||
|
||||
static products(limit?: number): string {
|
||||
return `products:${limit || "default"}`;
|
||||
}
|
||||
|
||||
static translations(locale: string, namespace?: string): string {
|
||||
return `translations:${locale}${namespace ? `:${namespace}` : ""}`;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user