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){
58
58
var data = load . call ( this ) ;
59
59
delete data [ key ] ;
60
60
store . call ( this , data ) ;
61
+ if ( this . expirationCache ) {
62
+ this . expirationCache . delete ( key ) ;
63
+ }
61
64
}
62
65
63
66
function load ( ) {
@@ -74,6 +77,10 @@ function store(data){
74
77
}
75
78
76
79
function setExpiration ( key , options ) {
80
+ if ( ! this . expirationCache ) {
81
+ return ;
82
+ }
83
+
77
84
var expirationMilli = getExpirationMilliSeconds ( options ) ;
78
85
var date = new Date ( ) ;
79
86
date . setMilliseconds ( date . getMilliseconds ( ) + expirationMilli ) ;
Original file line number Diff line number Diff line change 9
9
},
10
10
"homepage" : " http://github.com/kyleheddon/cache.js" ,
11
11
"main" : " index.js" ,
12
- "version" : " 0.1.0 " ,
12
+ "version" : " 0.1.1 " ,
13
13
"devDependencies" : {
14
14
"gulp" : " ~3.8" ,
15
15
"gulp-jasmine" : " ~2.0" ,
You can’t perform that action at this time.
0 commit comments