Skip to content

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. [email protected] 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