You are here

Cache.php in JSON-RPC 8

Same filename and directory in other branches
  1. 2.x modules/jsonrpc_core/src/Plugin/jsonrpc/Method/Cache.php

File

modules/jsonrpc_core/src/Plugin/jsonrpc/Method/Cache.php
View source
<?php

namespace Drupal\jsonrpc_core\Plugin\jsonrpc\Method;

use Drupal\jsonrpc\Object\ParameterBag;
use Drupal\jsonrpc\Plugin\JsonRpcMethodBase;

/**
 * Class CacheService.
 *
 * @JsonRpcMethod(
 *   id = "cache.rebuild",
 *   usage = @Translation("Rebuilds the system cache."),
 *   access = {"administer site configuration"},
 * ),
 */
class Cache extends JsonRpcMethodBase {

  /**
   * {@inheritdoc}
   */
  public function execute(ParameterBag $params) {
    drupal_flush_all_caches();
    return TRUE;
  }

  /**
   * {@inheritdoc}
   */
  public static function outputSchema() {
    return NULL;
  }

}

Classes

Namesort descending Description
Cache Class CacheService.