Add ability to return raw values from the datastore (sans marshalling)
nemtsov opened this issue · 1 comments
nemtsov commented
As a client configuring a new store,
I want to force distribucache to not marshall values,
In order to optimize for memory and cpu.
This is useful when you need to store a buffer or string and not an object (e.g., caching the html of the page). It will avoid the Buffer (Redis) -> String (Redis) -> Object (Distribucache) -> String (Express) -> Buffer (Http)
conversion that currently happens with the Redis store when storing the page html in cache.
Possible configuration:
cache = cacheClient.create('page:v1', {
useRawValues: true
});
nemtsov commented
As of v5.0.0, enabling optimizeForBuffers
flag will skip marshalling. (https://github.com/dowjones/distribucache/blob/master/CHANGELOG.md#500---2015-06-01)