summaryrefslogtreecommitdiff
path: root/sites/all/modules/ctools/includes/css-cache.inc
blob: d88160b5b88b569b54a8e29fa4742567be9d2d79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php

/**
 * @file
 * Custom cache implementation for the CTools CSS cache.
 */

class CToolsCssCache implements DrupalCacheInterface {

  /**
   * {@inheritdoc}
   */
  public function clear($cid = NULL, $wildcard = FALSE) {
    // Only clear the caches if the wildcard is set, this ensures that the cache
    // is only cleared when the full caches are cleared manually (eg by invoking
    // drupal_flush_all_caches()), and not on a cron run.
    // @see drupal_flush_all_caches()
    // @see system_cron()
    if ($wildcard) {
      ctools_include('css');
      ctools_css_flush_caches();
    }
  }

  /**
   * {@inheritdoc}
   */
  public function get($cid) {
    return FALSE;
  }

  /**
   * {@inheritdoc}
   */
  public function getMultiple(&$cids) {
    return array();
  }

  /**
   * {@inheritdoc}
   */
  public function isEmpty() {
    return FALSE;
  }

  /**
   * {@inheritdoc}
   */
  public function set($cid, $data, $expire = CACHE_PERMANENT) {
  }

}