Summary
@Josh-Walker-GM asked a question about doing something with the cache during Service Caching Discord office hours, which isn't currently possible. BUT, if we exported the cache client instance that we're using in MemcachedClient and RedisClient, then users could do whatever they wanted (as long as the underlying client itself supports it).
Motivation
This unlocks the full potential of memcached and Redis and doesn't just limit the API to the get and set functions that we expose.
Detailed proposal
Export the initialized client from api/src/lib, the one that's given to createCache():
export const { cache, cacheFindMany } = createCache(client, {
logger,
timeout: 500,
})
Proposed:
export const { cache, cacheFindMany, cacheClient } = createCache(client, {
logger,
timeout: 500,
})
cacheClient() itself would need to be updated to export the client after initialization.
Are you interested in working on this?
Summary
@Josh-Walker-GM asked a question about doing something with the cache during Service Caching Discord office hours, which isn't currently possible. BUT, if we exported the cache client instance that we're using in MemcachedClient and RedisClient, then users could do whatever they wanted (as long as the underlying client itself supports it).
Motivation
This unlocks the full potential of memcached and Redis and doesn't just limit the API to the
getandsetfunctions that we expose.Detailed proposal
Export the initialized client from
api/src/lib, the one that's given tocreateCache():Proposed:
cacheClient()itself would need to be updated to export the client after initialization.Are you interested in working on this?