mirror of
https://github.com/flynx/pWiki.git
synced 2025-12-16 08:01:39 +00:00
now the cache is storred on the .root page and shared by all decendents...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
7236429eed
commit
ff124c0a75
@ -1274,18 +1274,17 @@ object.Constructor('Page', BasePage, {
|
||||
var CachedPage =
|
||||
module.CachedPage =
|
||||
object.Constructor('CachedPage', Page, {
|
||||
// XXX should this always refer to .render_root.cachestore
|
||||
cachestore: undefined,
|
||||
/*/
|
||||
get cachestore(){
|
||||
return (this.render_root ?? this).__cachestore },
|
||||
set cachestore(value){
|
||||
;(this.render_root ?? this).__cachestore = value },
|
||||
//*/
|
||||
|
||||
// NOTE: set this to null/undefined/0 to disable...
|
||||
cache_timeout: '20m',
|
||||
|
||||
|
||||
// keep all the cache in one place -- .root
|
||||
//__cachestore: undefined,
|
||||
get cachestore(){
|
||||
return (this.root ?? this).__cachestore },
|
||||
set cachestore(value){
|
||||
;(this.root ?? this).__cachestore = value },
|
||||
|
||||
get cache(){
|
||||
this.chechCache(this.path)
|
||||
return ((this.cachestore ?? {})[this.path] ?? {}).value },
|
||||
|
||||
@ -348,7 +348,8 @@ store.update('Settings',
|
||||
// XXX not yet sure how to organize the actual client -- UI, hooks, .. etc
|
||||
var pwiki =
|
||||
module.pwiki =
|
||||
page.Page('/', '/', store)
|
||||
//page.Page('/', '/', store)
|
||||
page.CachedPage('/', '/', store)
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user