diff --git a/package.json b/package.json index b71d47a..49dd2ed 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ztimson/utils", - "version": "0.24.11", + "version": "0.24.12", "description": "Utility library", "author": "Zak Timson", "license": "MIT", diff --git a/src/cache.ts b/src/cache.ts index 47684af..54e96b2 100644 --- a/src/cache.ts +++ b/src/cache.ts @@ -172,7 +172,7 @@ export class Cache { * @return {this} */ set(key: K, value: T, ttl = this.options.ttl): this { - if(this.options.expiryPolicy == 'keep') delete (this.store[key])._expired; + if(this.options.expiryPolicy == 'keep') delete (value)._expired; this.store[key] = value; this.save(); if(ttl) setTimeout(() => {