File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,9 @@ Cache.prototype.delete = function(key){
5858 var data = load . call ( this ) ;
5959 delete data [ key ] ;
6060 store . call ( this , data ) ;
61+ if ( this . expirationCache ) {
62+ this . expirationCache . delete ( key ) ;
63+ }
6164}
6265
6366function load ( ) {
@@ -74,6 +77,10 @@ function store(data){
7477}
7578
7679function setExpiration ( key , options ) {
80+ if ( ! this . expirationCache ) {
81+ return ;
82+ }
83+
7784 var expirationMilli = getExpirationMilliSeconds ( options ) ;
7885 var date = new Date ( ) ;
7986 date . setMilliseconds ( date . getMilliseconds ( ) + expirationMilli ) ;
Original file line number Diff line number Diff line change 99 },
1010 "homepage" : " http://github.com/kyleheddon/cache.js" ,
1111 "main" : " index.js" ,
12- "version" : " 0.1.0 " ,
12+ "version" : " 0.1.1 " ,
1313 "devDependencies" : {
1414 "gulp" : " ~3.8" ,
1515 "gulp-jasmine" : " ~2.0" ,
You can’t perform that action at this time.
0 commit comments