📝Hyperc
The module provides a simple way to cache data in Redis.
Imports
Method of Use
To use this module, you need to inject it into the desired service.
Injecting the module into our service.
With dependencies
You will need to inject the following interfaces.
IConfigurationService
IValidatorRegexpService
IStringExService
IRedisService
IDebugService
Methods
_nameExpire
private
Returns the name expire of the cache serialized.
_nameKey
private
Returns the name key of the cache serialized.
_isExpired
private
Check if the cache is expired.
create
public
Create a new cache with a ttl in milliseconds (ms).
set
public
Set a new value in the cache.
get
public
Get a value from the cache.
del
public
Delete a value from the cache.
flush
public
Delete all values from the cache.
flushAll
public
Delete all values from all caches.
Last updated