New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cachegoose

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cachegoose - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

1

out/extend-query.js

@@ -80,2 +80,3 @@ 'use strict';

limit: this.options.limit,
sort: this.options.sort,
_options: this._mongooseOptions,

@@ -82,0 +83,0 @@ _conditions: this._conditions,

2

package.json
{
"name": "cachegoose",
"version": "4.0.0",
"version": "4.0.1",
"description": "Mongoose caching that actually works.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -77,2 +77,3 @@ 'use strict';

limit: this.options.limit,
sort: this.options.sort,
_options: this._mongooseOptions,

@@ -79,0 +80,0 @@ _conditions: this._conditions,

@@ -281,2 +281,15 @@ 'use strict';

});
it('should correctly cache a query with a sort order', async () => {
const res = await getAllSorted({ num: 1 });
res.length.should.equal(10);
await generate(10);
const cached = await getAllSorted({ num: 1 });
cached.length.should.equal(10);
const diffSort = await getAllSorted({ num: -1 });
diffSort.length.should.equal(20);
});
});

@@ -333,2 +346,6 @@

function getAllSorted(sortObj) {
return Record.find({}).sort(sortObj).cache(60).exec();
}
function count(ttl, cb) {

@@ -335,0 +352,0 @@ return Record.find({})

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc