Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional Cache Value Compression #2

Closed
wants to merge 2 commits into from
Closed

Optional Cache Value Compression #2

wants to merge 2 commits into from

Conversation

Jared314
Copy link

@Jared314 Jared314 commented Jun 8, 2014

MongoDB has a 16MB document size limit, and, currently, does not have built in support for compression. So, I found it useful to gzip large Buffers I stored using cacheman-mongo.

var cache = new Cache({ compression: true }, {});
cache.set('test1', new Buffer("something big"), function (err) {...});

It only compresses Buffers because of the complexity in correctly decompressing and deserializing the variety of data structures and string encodings. (Using the BSON serializer might be a good solution to this problem, but I have not yet explored that option.)

cayasso added a commit that referenced this pull request Feb 12, 2015
@cayasso
Copy link
Owner

cayasso commented Feb 12, 2015

@Jared314 sorry, I totally missed this PR. cacheman-mongo@0.2.1 now has this feature, I couldn't merge it because 0.2.1 files changed and there is no longer a lib folder, but I copy the code just how it was and did some minor changes. Thanks for your contribution.

@cayasso cayasso closed this Feb 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants