simplified a lot of stuff

This commit is contained in:
Boki 2025-06-26 15:34:48 -04:00
parent b845a8eade
commit 885b484a37
20 changed files with 360 additions and 1335 deletions

View file

@ -5,7 +5,7 @@ import type { CacheOptions, CacheProvider } from './types';
const cacheInstances = new Map<string, CacheProvider>();
/**
* Create a Redis cache instance with trading-optimized defaults
* Create a Redis cache instance
*/
export function createCache(options: CacheOptions): CacheProvider {
const defaultOptions: CacheOptions = {
@ -37,19 +37,7 @@ export function createCache(options: CacheOptions): CacheProvider {
return new RedisCache(defaultOptions);
}
// Export types and classes
export type {
CacheConfig,
CacheKey,
CacheOptions,
CacheProvider,
CacheStats,
RedisConfig,
SerializationOptions,
} from './types';
export { RedisConnectionManager } from './connection-manager';
export { CacheKeyGenerator } from './key-generator';
export { RedisCache } from './redis-cache';
// Export only what's actually used
export type { CacheProvider, CacheStats } from './types';
export { NamespacedCache } from './namespaced-cache';
export { createNamespacedCache, isCacheAvailable } from './cache-factory';
export { createNamespacedCache } from './cache-factory';