HEX
Server: Apache
System: Linux dev.epsylon.net 3.10.0-1160.144.1.el7.tuxcare.els2.x86_64 #1 SMP Sun Feb 15 11:22:42 UTC 2026 x86_64
User: nexper (1054)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/nexper/www/nexper_drupal/sites/all/modules/ctools/plugins/cache/simple.inc
<?php

/**
 * @file
 * A simple cache indirection mechanism that just uses the basic object cache.
 */

$plugin = array(
  // cache plugins are the rare plugin types that have no real UI but
  // we're providing a title just in case.
  'title' => t('Simple'),
  'cache get' => 'ctools_cache_simple_cache_get',
  'cache set' => 'ctools_cache_simple_cache_set',
  'cache clear' => 'ctools_cache_simple_cache_clear',
);

function ctools_cache_simple_cache_get($data, $key) {
  ctools_include('object-cache');

  // Ensure that if there is somehow no data, we at least don't stomp on other
  // people's caches.
  if (empty($data)) {
    $data = 'simple_cache_plugin';
  }

  return ctools_object_cache_get($data, $key);
}

function ctools_cache_simple_cache_set($data, $key, $object) {
  ctools_include('object-cache');

  // Ensure that if there is somehow no data, we at least don't stomp on other
  // people's caches.
  if (empty($data)) {
    $data = 'simple_cache_plugin';
  }

  return ctools_object_cache_set($data, $key, $object);
}

function ctools_cache_simple_cache_clear($data, $key) {
  ctools_include('object-cache');

  // Ensure that if there is somehow no data, we at least don't stomp on other
  // people's caches.
  if (empty($data)) {
    $data = 'simple_cache_plugin';
  }

  return ctools_object_cache_clear($data, $key);
}