Variable: CacheKeys
const
CacheKeys: {config
: {byName
: (name
:string
) =>string
;validation
: (name
:string
) =>string
; };monitor
: {byId
: (id
:string
) =>string
;bySite
: (siteIdentifier
:string
) =>string
;operation
: (id
:string
) =>string
; };site
: {bulkOperation
: () =>string
;byIdentifier
: (identifier
:string
) =>string
;loading
: (identifier
:string
) =>string
; };validation
: {byType
: (type
:string
,identifier
:string
) =>string
;monitorType
: (monitorType
:string
) =>string
; }; }
Defined in: shared/utils/cacheKeys.ts:87
Centralized cache key generation utilities.
Type Declarationโ
configโ
readonly
config: {byName
: (name
:string
) =>string
;validation
: (name
:string
) =>string
; }
Configuration-related cache keys.
config.byName()โ
readonly
byName: (name
:string
) =>string
Generate cache key for configuration value by name.
Parametersโ
nameโ
string
Configuration name or setting identifier
Returnsโ
string
Standardized cache key for configuration values
Exampleโ
const key = CacheKeys.config.byName("history-limit");
// Returns: "config:history-limit"
config.validation()โ
readonly
validation: (name
:string
) =>string
Generate cache key for configuration validation result.
Parametersโ
nameโ
string
Configuration name being validated
Returnsโ
string
Standardized cache key for configuration validation
Exampleโ
const key = CacheKeys.config.validation("monitor-config");
// Returns: "config:validation:monitor-config"
monitorโ
readonly
monitor: {byId
: (id
:string
) =>string
;bySite
: (siteIdentifier
:string
) =>string
;operation
: (id
:string
) =>string
; }
Monitor-related cache keys.
monitor.byId()โ
readonly
byId: (id
:string
) =>string
Generate cache key for monitor by ID.
Parametersโ
idโ
string
Monitor identifier
Returnsโ
string
Standardized cache key for monitor data
Exampleโ
const key = CacheKeys.monitor.byId("monitor-123");
// Returns: "monitor:monitor-123"
monitor.bySite()โ
readonly
bySite: (siteIdentifier
:string
) =>string
Generate cache key for monitors by site identifier.
Parametersโ
siteIdentifierโ
string
Site identifier containing the monitors
Returnsโ
string
Standardized cache key for site monitors
Exampleโ
const key = CacheKeys.monitor.bySite("site-456");
// Returns: "monitor:site:site-456"
monitor.operation()โ
readonly
operation: (id
:string
) =>string
Generate cache key for monitor operation status.
Parametersโ
idโ
string
Monitor identifier
Returnsโ
string
Standardized cache key for monitor operation tracking
Exampleโ
const key = CacheKeys.monitor.operation("monitor-123");
// Returns: "monitor:operation:monitor-123"
siteโ
readonly
site: {bulkOperation
: () =>string
;byIdentifier
: (identifier
:string
) =>string
;loading
: (identifier
:string
) =>string
; }
Site-related cache keys.
site.bulkOperation()โ
readonly
bulkOperation: () =>string
Generate cache key for bulk site operations.
Returnsโ
string
Standardized cache key for bulk site operations
Exampleโ
const key = CacheKeys.site.bulkOperation();
// Returns: "site:bulk"
site.byIdentifier()โ
readonly
byIdentifier: (identifier
:string
) =>string
Generate cache key for site by identifier.
Parametersโ
identifierโ
string
Site identifier
Returnsโ
string
Standardized cache key for site data
Exampleโ
const key = CacheKeys.site.byIdentifier("site-123");
// Returns: "site:site-123"
site.loading()โ
readonly
loading: (identifier
:string
) =>string
Generate cache key for site loading operation.
Parametersโ
identifierโ
string
Site identifier being loaded
Returnsโ
string
Standardized cache key for site loading status
Exampleโ
const key = CacheKeys.site.loading("site-123");
// Returns: "site:loading:site-123"
validationโ
readonly
validation: {byType
: (type
:string
,identifier
:string
) =>string
;monitorType
: (monitorType
:string
) =>string
; }
Validation-related cache keys.
validation.byType()โ
readonly
byType: (type
:string
,identifier
:string
) =>string
Generate cache key for validation result by type and identifier.
Parametersโ
typeโ
string
Type of validation (e.g., "monitor", "site")
identifierโ
string
Item identifier being validated
Returnsโ
string
Standardized cache key for validation results
Exampleโ
const key = CacheKeys.validation.byType("monitor", "config-123");
// Returns: "validation:monitor:config-123"
validation.monitorType()โ
readonly
monitorType: (monitorType
:string
) =>string
Generate cache key for monitor type validation.
Parametersโ
monitorTypeโ
string
Monitor type being validated
Returnsโ
string
Standardized cache key for monitor type validation
Exampleโ
const key = CacheKeys.validation.monitorType("http");
// Returns: "validation:monitor-type:http"
Remarksโ
Provides domain-specific key generation functions that ensure consistent cache key patterns across the entire application. All functions return properly formatted cache keys following the established conventions.