summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-09-18 17:46:28 -0700
committerBharat Mediratta <bharat@menalto.com>2010-09-18 17:46:28 -0700
commitfad1f05203f9c45b759fd0f4731e9025bca86114 (patch)
treebe8834ef7c31c534ea7b48cb73879fdb4690f47e /modules/gallery/controllers
parenta1b1d323af458958c9e06c8160bffb97882b8d41 (diff)
The Kohana folks removed the cache cleanup code back in
http://dev.kohanaframework.org/projects/kohana2/repository/revisions/4605 So now our cache entries don't expire. For now, do cache expiration whenever we render Admin > Maintenance, since that's the type of place that users will go when they want their cache to expire anyway.
Diffstat (limited to 'modules/gallery/controllers')
-rw-r--r--modules/gallery/controllers/admin_maintenance.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/gallery/controllers/admin_maintenance.php b/modules/gallery/controllers/admin_maintenance.php
index a9cc933c..7729d797 100644
--- a/modules/gallery/controllers/admin_maintenance.php
+++ b/modules/gallery/controllers/admin_maintenance.php
@@ -48,6 +48,13 @@ class Admin_Maintenance_Controller extends Admin_Controller {
$view->content->finished_tasks = ORM::factory("task")
->where("done", "=", 1)->order_by("updated", "DESC")->find_all();
print $view;
+
+ // Do some maintenance while we're in here
+ db::build()
+ ->delete("caches")
+ ->where("expiration", "<>", 0)
+ ->where("expiration", "<=", time())
+ ->execute();
}
/**