CacheClient class
Constructors
-
CacheClient(CredentialProvider credentialProvider, CacheClientConfiguration configuration, Duration defaultTtl)
-
Client to perform operations against Momento Serverless Cache.
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
-
close()
→ Future<void>
-
Close the client and free up all associated resources.
override
-
createCache(String cacheName)
→ Future<CreateCacheResponse>
-
Creates a cache with the name
cacheName
if it doesn't exist.
override
-
delete(String cacheName, String key)
→ Future<DeleteResponse>
-
Removes the given key from the cache.
override
-
deleteCache(String cacheName)
→ Future<DeleteCacheResponse>
-
Deletes a cache with the name
cacheName
.
override
-
get(String cacheName, String key)
→ Future<GetResponse>
-
Gets the cache value stored for a given key.
override
-
listCaches()
→ Future<ListCachesResponse>
-
Lists all caches.
override
-
listConcatenateBack(String cacheName, String listName, List<String> values, {CollectionTtl? ttl, int? truncateFrontToSize})
→ Future<ListConcatenateBackResponse>
-
Adds multiple elements to the back of the given list. Creates the list if it does not already exist.
override
-
listConcatenateBackBytes(String cacheName, String listName, List<List<int>> values, {CollectionTtl? ttl, int? truncateFrontToSize})
→ Future<ListConcatenateBackResponse>
-
Adds multiple elements to the back of the given list. Creates the list if it does not already exist.
override
-
listConcatenateFront(String cacheName, String listName, List<String> values, {CollectionTtl? ttl, int? truncateBackToSize})
→ Future<ListConcatenateFrontResponse>
-
Adds multiple elements to the front of the given list. Creates the list if it does not already exist.
override
-
listConcatenateFrontBytes(String cacheName, String listName, List<List<int>> values, {CollectionTtl? ttl, int? truncateBackToSize})
→ Future<ListConcatenateFrontResponse>
-
Adds multiple elements to the front of the given list. Creates the list if it does not already exist.
override
-
listFetch(String cacheName, String listName, {int? startIndex, int? endIndex})
→ Future<ListFetchResponse>
-
Fetches all elements of the given list.
override
-
listLength(String cacheName, String listName)
→ Future<ListLengthResponse>
-
Gets the number of elements in the given list.
override
-
listPopBack(String cacheName, String listName)
→ Future<ListPopBackResponse>
-
Gets and removes the last value from the given list.
override
-
listPopFront(String cacheName, String listName)
→ Future<ListPopFrontResponse>
-
Gets and removes the first value from the given list.
override
-
listPushBack(String cacheName, String listName, String value, {CollectionTtl? ttl, int? truncateFrontToSize})
→ Future<ListPushBackResponse>
-
Adds an element to the back of the given list. Creates the list if it does not already exist.
override
-
listPushBackBytes(String cacheName, String listName, List<int> value, {CollectionTtl? ttl, int? truncateFrontToSize})
→ Future<ListPushBackResponse>
-
Adds an element to the back of the given list. Creates the list if it does not already exist.
override
-
listPushFront(String cacheName, String listName, String value, {CollectionTtl? ttl, int? truncateBackToSize})
→ Future<ListPushFrontResponse>
-
Adds an element to the front of the given list. Creates the list if it does not already exist.
override
-
listPushFrontBytes(String cacheName, String listName, List<int> value, {CollectionTtl? ttl, int? truncateBackToSize})
→ Future<ListPushFrontResponse>
-
Adds an element to the front of the given list. Creates the list if it does not already exist.
override
-
listRemoveValue(String cacheName, String listName, String value)
→ Future<ListRemoveValueResponse>
-
Removes all elements from the given list equal to the given value.
override
-
listRemoveValueBytes(String cacheName, String listName, List<int> value)
→ Future<ListRemoveValueResponse>
-
Removes all elements from the given list equal to the given value.
override
-
listRetain(String cacheName, String listName, {int? startIndex, int? endIndex, CollectionTtl? ttl})
→ Future<ListRetainResponse>
-
Retains slice of elements of a given list, deletes the rest of the list that isn't being retained.
override
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
set(String cacheName, String key, String value, {Duration? ttl})
→ Future<SetResponse>
-
Associates the given key with the given string value.
override
-
setBytes(String cacheName, String key, List<int> value, {Duration? ttl})
→ Future<SetResponse>
-
Associates the given key with the given binary value.
override
-
toString()
→ String
-
A string representation of this object.
inherited