Mercurial > SimpleWebPresenter
comparison Flag.inc @ 99:d98e315308cd
Improved caching of flag and sitemap.
| author | Tom Fredrik "BFG" Klaussen <bfg@blenning.no> |
|---|---|
| date | Sun, 14 Sep 2014 21:11:27 +0200 |
| parents | f468365813c9 |
| children | f2996720e6d6 |
comparison
equal
deleted
inserted
replaced
| 98:f2d52fed708c | 99:d98e315308cd |
|---|---|
| 49 if ($this->active) | 49 if ($this->active) |
| 50 $this->name .= "-active"; | 50 $this->name .= "-active"; |
| 51 $this->name .= ".png"; | 51 $this->name .= ".png"; |
| 52 | 52 |
| 53 $cache = new CacheTimeCheck($this->name); | 53 $cache = new CacheTimeCheck($this->name); |
| 54 $cache->setMaxAge(86400); | |
| 54 $cache->addParent($masterCache); | 55 $cache->addParent($masterCache); |
| 55 $this->setCache($cache); | 56 $this->setCache($cache); |
| 56 } | 57 } |
| 57 | 58 |
| 58 function cacheCheck() | 59 function cacheCheck() |
| 59 { | 60 { |
| 60 $this->getCache()->cache_time($this->name); | 61 return Cacheable::YES; |
| 61 return $true; | |
| 62 } | 62 } |
| 63 | 63 |
| 64 function mayCompress() | 64 function mayCompress() |
| 65 { | 65 { |
| 66 return false; | 66 return false; |
