| 1 |
<?php
|
| 2 |
// $Id$
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @file
|
| 6 |
* Actions for managing the static page cache provided by the Boost module.
|
| 7 |
*/
|
| 8 |
|
| 9 |
//////////////////////////////////////////////////////////////////////////////
|
| 10 |
|
| 11 |
/**
|
| 12 |
* Lists all files currently in the Boost static file system cache.
|
| 13 |
*/
|
| 14 |
function drush_boost_list() {
|
| 15 |
// TODO: implementation.
|
| 16 |
}
|
| 17 |
|
| 18 |
/**
|
| 19 |
* Expires all files, or all files matching a given path, from the static page cache.
|
| 20 |
*/
|
| 21 |
function drush_boost_expire($path = NULL) {
|
| 22 |
drush_op('boost_cache_expire', $path, TRUE);
|
| 23 |
|
| 24 |
if (DRUSH_VERBOSE) {
|
| 25 |
drush_print(empty($key) ? t('Boost static page cache fully cleared.') :
|
| 26 |
t("Boost cached pages like `%path' expired.", array('%path' => $path)));
|
| 27 |
}
|
| 28 |
}
|
| 29 |
|
| 30 |
/**
|
| 31 |
* Enables the Boost static page cache.
|
| 32 |
*/
|
| 33 |
function drush_boost_enable() {
|
| 34 |
drush_op('variable_set', 'boost', CACHE_ENABLED);
|
| 35 |
|
| 36 |
if (DRUSH_VERBOSE) {
|
| 37 |
drush_print(t('Boost static page cache enabled.'));
|
| 38 |
}
|
| 39 |
}
|
| 40 |
|
| 41 |
/**
|
| 42 |
* Disables the Boost static page cache.
|
| 43 |
*/
|
| 44 |
function drush_boost_disable() {
|
| 45 |
drush_op('variable_set', 'boost', CACHE_DISABLED);
|
| 46 |
|
| 47 |
if (DRUSH_VERBOSE) {
|
| 48 |
drush_print(t('Boost static page cache disabled.'));
|
| 49 |
}
|
| 50 |
}
|
| 51 |
|
| 52 |
//////////////////////////////////////////////////////////////////////////////
|