Variable: CacheKeys
constCacheKeys: {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โ
readonlyconfig: {byName: (name:string) =>string;validation: (name:string) =>string; }
Configuration-related cache keys.
config.byName()โ
readonlybyName: (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()โ
readonlyvalidation: (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โ
readonlymonitor: {byId: (id:string) =>string;bySite: (siteIdentifier:string) =>string;operation: (id:string) =>string; }
Monitor-related cache keys.
monitor.byId()โ
readonlybyId: (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()โ
readonlybySite: (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()โ
readonlyoperation: (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โ
readonlysite: {bulkOperation: () =>string;byIdentifier: (identifier:string) =>string;loading: (identifier:string) =>string; }
Site-related cache keys.
site.bulkOperation()โ
readonlybulkOperation: () =>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()โ
readonlybyIdentifier: (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()โ
readonlyloading: (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โ
readonlyvalidation: {byType: (type:string,identifier:string) =>string;monitorType: (monitorType:string) =>string; }
Validation-related cache keys.
validation.byType()โ
readonlybyType: (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()โ
readonlymonitorType: (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.