File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " loopback-redis-cache" ,
3- "version" : " 1.0.10 " ,
3+ "version" : " 1.0.11 " ,
44 "description" : " Redis cache for loopback.io" ,
55 "main" : " rediscache.js" ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ module.exports = function(Model, options) {
3131 var cachExpire = ctx . req . query . cache ;
3232
3333 // set key name
34- var cache_key = modelName + '_' + new Buffer ( JSON . stringify ( ctx . req . query ) ) . toString ( 'base64' ) ;
34+ var cache_key = modelName + '_' + new Buffer ( JSON . stringify ( ctx . req . params ) + JSON . stringify ( ctx . req . query ) ) . toString ( 'base64' ) ;
3535
3636 // search for cache
3737 client . get ( cache_key , function ( err , val ) {
@@ -68,7 +68,7 @@ module.exports = function(Model, options) {
6868 var cachExpire = ctx . req . query . cache ;
6969
7070 // set key name
71- var cache_key = modelName + '_' + new Buffer ( JSON . stringify ( ctx . req . query ) ) . toString ( 'base64' ) ;
71+ var cache_key = modelName + '_' + new Buffer ( JSON . stringify ( ctx . req . params ) + JSON . stringify ( ctx . req . query ) ) . toString ( 'base64' ) ;
7272 // search for cache
7373 client . get ( cache_key , function ( err , val ) {
7474 if ( err ) {
You can’t perform that action at this time.
0 commit comments