1 |
e4c061ad
|
Assos Assos
|
<?php
|
2 |
|
|
|
3 |
|
|
/**
|
4 |
|
|
* @file
|
5 |
|
|
* Custom cache implementation for the CTools CSS cache.
|
6 |
|
|
*/
|
7 |
|
|
|
8 |
|
|
class CToolsCssCache implements DrupalCacheInterface {
|
9 |
|
|
|
10 |
|
|
/**
|
11 |
|
|
* {@inheritdoc}
|
12 |
|
|
*/
|
13 |
|
|
public function clear($cid = NULL, $wildcard = FALSE) {
|
14 |
|
|
// Only clear the caches if the wildcard is set, this ensures that the cache
|
15 |
|
|
// is only cleared when the full caches are cleared manually (eg by invoking
|
16 |
|
|
// drupal_flush_all_caches()), and not on a cron run.
|
17 |
|
|
// @see drupal_flush_all_caches()
|
18 |
|
|
// @see system_cron()
|
19 |
|
|
if ($wildcard) {
|
20 |
|
|
ctools_include('css');
|
21 |
|
|
ctools_css_flush_caches();
|
22 |
|
|
}
|
23 |
|
|
}
|
24 |
|
|
|
25 |
|
|
/**
|
26 |
|
|
* {@inheritdoc}
|
27 |
|
|
*/
|
28 |
|
|
public function get($cid) {
|
29 |
|
|
return FALSE;
|
30 |
|
|
}
|
31 |
|
|
|
32 |
|
|
/**
|
33 |
|
|
* {@inheritdoc}
|
34 |
|
|
*/
|
35 |
|
|
public function getMultiple(&$cids) {
|
36 |
|
|
return array();
|
37 |
|
|
}
|
38 |
|
|
|
39 |
|
|
/**
|
40 |
|
|
* {@inheritdoc}
|
41 |
|
|
*/
|
42 |
|
|
public function isEmpty() {
|
43 |
|
|
return FALSE;
|
44 |
|
|
}
|
45 |
|
|
|
46 |
|
|
/**
|
47 |
|
|
* {@inheritdoc}
|
48 |
|
|
*/
|
49 |
|
|
public function set($cid, $data, $expire = CACHE_PERMANENT) {
|
50 |
|
|
}
|
51 |
|
|
|
52 |
|
|
} |