DVMemcachedCacheAdapter class

DV.Cache on Memcached.

Values are JSON-wrapped exactly as the database and Redis adapters wrap them, so the three are interchangeable. Memcached expires keys itself, so purgeExpired has nothing to reclaim and reports zero.

Implemented types

Constructors

DVMemcachedCacheAdapter({String host = '127.0.0.1', int port = 11211, String keyPrefix = 'dartvel:', DVMemcachedConnect? connector})

Properties

hashCode int
The hash code for this object.
no setterinherited
host String
final
keyPrefix String
Prefix isolating this application's keys on a shared server.
final
port int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() Future<void>
override
close() Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
purgeExpired() Future<int>
Removes expired entries. Reads already ignore them; this reclaims space.
override
read(String key) Future<Object?>
override
remove(String key) Future<void>
override
toString() String
A string representation of this object.
inherited
write(String key, Object? value, Duration? ttl) Future<void>
override
writeIfAbsent(String key, Object? value, Duration? ttl) Future<bool>
Writes only when key is absent. Returns whether the write happened.
override

Operators

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