From 10f1563c4a1089a4fa789290c47e701ce46367a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=9F=E9=85=8C=20=E9=B5=AC=E5=85=84?= Date: Wed, 21 Dec 2016 21:36:26 +0800 Subject: [PATCH] Page cached did not remove --- system/PageCache.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/system/PageCache.js b/system/PageCache.js index 0de48f3..8230336 100644 --- a/system/PageCache.js +++ b/system/PageCache.js @@ -23,10 +23,11 @@ class PageCache setInterval( () => { var d = new Date().getTime(); - for( var i in this.cache ) + for( let store of this.cache ) + for( var i in store ) { - var c = this.cache[ i ]; - if( c.ttl < d ) delete this.cache[ i ]; + var c = store[ i ]; + if( c.ttl < d ) delete store[ i ]; } for( var i in this.excepts )