Interface IPostgrestCacheProvider
- Namespace
- Supabase.Postgrest.Interfaces
- Assembly
- Supabase.Postgrest.dll
A caching provider than can be used by postgrest to store requests.
public interface IPostgrestCacheProvider
Methods
ClearItem(string)
Clear an item within a caching solution by a key.
Task ClearItem(string key)
Parameters
key
stringA reproducible key for a defined query.
Returns
Empty()
An empty/clear cache implementation.
Task Empty()
Returns
GetItem<T>(string)
Gets an item from a caching solution, should coerce into a datatype.
This will most likely be a JSON deserialization approach.
Task<T?> GetItem<T>(string key)
Parameters
key
stringA reproducible key for a defined query.
Returns
- Task<T>
Type Parameters
T
SetItem(string, object)
Sets an item within a caching solution, should store in a way that the data can be retrieved and coerced into a generic type by GetItem<T>(string)
This will most likely be a JSON serialization approach.
Task SetItem(string key, object value)