ProxyCacheManager class

Manager for caching proxies in a tiered system

Constructors

ProxyCacheManager.new({required SharedPreferences sharedPreferences, int primaryCacheSize = 10, int secondaryCacheSize = 50, int tertiaryCacheSize = 200})
Creates a new ProxyCacheManager with the given parameters

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addProxy(ProxyModel proxy) Future<void>
Adds a proxy to the cache
clearAllCaches() Future<void>
Clears all caches
getAllProxies() List<ProxyModel>
Gets all cached proxies from all tiers
getBestPerformingProxies({int count = 10}) List<ProxyModel>
Gets the best performing proxies based on their scores
getCacheStats() Map<String, dynamic>
Gets cache statistics
getMostFrequentlyUsedProxies({int count = 10}) List<ProxyModel>
Gets the most frequently used proxies
getMostRecentlyUsedProxies({int count = 10}) List<ProxyModel>
Gets the most recently used proxies
getProxiesFromTier(CacheTier tier) List<ProxyModel>
Gets all proxies from a specific tier
initialize() Future<void>
Initializes the cache manager
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited