The find method returns the the key data which includs ICacheData.value and ICacheData.expiration.
The incrementUnexpired should always throw an error if the existing item is not a number type.
The insert method inserts the given cache data.
The removeExpiredMany method updates a expired key.
The removeExpiredMany method updates a unexpired key.
The upsert method inserts a key and if the key already exists then key will be updated with new data.value and data.expiration.
The method always returns the old cache data if it exists otherwise null will be returned.
The
IDatabaseCacheAdaptercontract defines a way for as key-value pairs independent of data storage. This contract simplifies the implementation of cache adapters with CRUD-based databases, such as SQL databases and ORMs like TypeOrm and MikroOrm.IMPORT_PATH:
"@daiso-tech/core/cache/contracts"