I need to cache the modules using Redis and each module cache data need to be in separate hash table. Let me say, I have 2 modules:
- employee
- company Now the API's related to employee module need to be cached in the hash table employee. For example:
hset('employee', 'emp_id_2', 'emp_name_2')
hset('employee', 'emp_id_1', 'emp_name_1')
When I integrate the redis cache in flask, I could see there is no hget and hset. How do I store the data with hash in redis?
The rediscache integration in flask
rediscache = Cache(app, config={
"CACHE_TYPE": "RedisCache",
"CACHE_REDIS_HOST": "127.0.0.1",
"port": 6379
})