diff options
author | VirtualTam <virtualtam@flibidi.net> | 2015-08-13 23:54:26 +0200 |
---|---|---|
committer | VirtualTam <virtualtam@flibidi.net> | 2015-08-13 23:54:26 +0200 |
commit | a3b1b4ae709bd3c5a8ec6fe29aa36fd01c52bca5 (patch) | |
tree | 003ac85fc10d2b9b5051f299fda083a9ced69972 /application/LinkDB.php | |
parent | 5ac5349ac053b1e560b136c62f8c764fd3230039 (diff) | |
parent | aedd62e2b84b4ea0d3c03f5c23ec594f4ebb1c17 (diff) | |
download | Shaarli-a3b1b4ae709bd3c5a8ec6fe29aa36fd01c52bca5.tar.gz Shaarli-a3b1b4ae709bd3c5a8ec6fe29aa36fd01c52bca5.tar.zst Shaarli-a3b1b4ae709bd3c5a8ec6fe29aa36fd01c52bca5.zip |
Merge pull request #309 from virtualtam/refactor/PageCache
CachedPage: move to a proper file, add tests
Diffstat (limited to 'application/LinkDB.php')
-rw-r--r-- | application/LinkDB.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/application/LinkDB.php b/application/LinkDB.php index 1e16fef1..463aa47e 100644 --- a/application/LinkDB.php +++ b/application/LinkDB.php | |||
@@ -269,8 +269,10 @@ You use the community supported version of the original Shaarli project, by Seba | |||
269 | 269 | ||
270 | /** | 270 | /** |
271 | * Saves the database from memory to disk | 271 | * Saves the database from memory to disk |
272 | * | ||
273 | * @param string $pageCacheDir page cache directory | ||
272 | */ | 274 | */ |
273 | public function savedb() | 275 | public function savedb($pageCacheDir) |
274 | { | 276 | { |
275 | if (!$this->_loggedIn) { | 277 | if (!$this->_loggedIn) { |
276 | // TODO: raise an Exception instead | 278 | // TODO: raise an Exception instead |
@@ -280,7 +282,7 @@ You use the community supported version of the original Shaarli project, by Seba | |||
280 | $this->_datastore, | 282 | $this->_datastore, |
281 | self::$phpPrefix.base64_encode(gzdeflate(serialize($this->_links))).self::$phpSuffix | 283 | self::$phpPrefix.base64_encode(gzdeflate(serialize($this->_links))).self::$phpSuffix |
282 | ); | 284 | ); |
283 | invalidateCaches(); | 285 | invalidateCaches($pageCacheDir); |
284 | } | 286 | } |
285 | 287 | ||
286 | /** | 288 | /** |
@@ -439,4 +441,3 @@ You use the community supported version of the original Shaarli project, by Seba | |||
439 | return $linkDays; | 441 | return $linkDays; |
440 | } | 442 | } |
441 | } | 443 | } |
442 | ?> | ||