MemoryCacheDelegate<D extends Object, P extends Object> class
A simple memory cache for cache-service
D Data type
P Params type
- Implemented types
-
- SyncCacheDelegate<
D, P>
- SyncCacheDelegate<
- Available extensions
Constructors
- MemoryCacheDelegate.map()
- Creates a delegate with backing memory map as a storage
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
-
delete(
P params) → void -
Deletes cached value
paramsCaching keyoverride -
get(
P params) → Entity< D> ? -
Returns data if cached
paramsCaching keyoverride -
invalidate(
P params) → void -
Invalidates cached value
paramsCaching keyoverride -
invalidateAll(
) → void -
Invalidates all cached values
override
-
makeFriendParams<
P extends Object> (String stringify(P params)) → SyncCacheDelegate< D, P> -
Available on SyncCacheDelegate<
Creates an adapter delegate that creates CacheFriend params usingD, CacheFriend> , provided by the SyncCacheFriendExtension extensionstringifyfunction Receiver - Delegate with CacheFriend params e.g. the one that saves data to files and uses params as file names -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
save(
P params, Entity< D> entity) → void -
Saves data to cache
paramsCaching keyentityEntity to cacheoverride -
stringifyParams<
P extends Object> ([String stringify(P params)?]) → SyncCacheDelegate< D, P> -
Available on SyncCacheDelegate<
Creates an adapter delegate that creates CacheFriend params usingD, String> , provided by the StringKeyExtension extensionstringifyfunction Receiver - Delegate with CacheFriend params e.g. the one that saves data to files and uses params as file names -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited