Cache
A caching implementation to make the system more fluid and not always rely on SQL operations.
Available:
Redis
Fake
Methods:
Save: Caches a value passed in a key.
const data = { message: 'data' };
await this.cacheProvider.save('key:id=123', data);
Recovery: Retrieves cached data from a key.
const data = await this.cacheProvider.recovery('key:id=123');
Invalidate: Deletes a specific key value set.
await this.cacheProvider.invalidate('key:id=123');
InvalidatePrefix: Deletes all key value sets started by the passed key.
await this.cacheProvider.invalidatePrefix('key');
Last updated
Was this helpful?