css-cache.inc 971 B

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