Commit bcccb3c5 authored by AndyThornton's avatar AndyThornton Committed by Sam Mortenson

Issue #3162499 by AndyThornton: Tome cache table limited to 5000 rows

parent daa8bbad
......@@ -4,7 +4,9 @@ namespace Drupal\tome_static;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Cache\CacheableResponseInterface;
use Drupal\Core\Cache\CacheTagsChecksumInterface;
use Drupal\Core\Cache\DatabaseBackend;
use Drupal\Core\Database\Connection;
use Drupal\Core\Site\Settings;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
......@@ -16,6 +18,18 @@ use Symfony\Component\HttpFoundation\Response;
*/
class StaticCache extends DatabaseBackend implements StaticCacheInterface {
/**
* Constructs a StaticCache object.
*
* @param \Drupal\Core\Database\Connection $connection
* The database connection.
* @param \Drupal\Core\Cache\CacheTagsChecksumInterface $checksum_provider
* The cache tags checksum provider.
*/
public function __construct(Connection $connection, CacheTagsChecksumInterface $checksum_provider) {
parent::__construct($connection, $checksum_provider, 'tome_static', self::MAXIMUM_NONE);
}
/**
* {@inheritdoc}
*/
......
......@@ -4,7 +4,7 @@ services:
arguments: ['@http_kernel', '@request_stack', '@event_dispatcher', '@cache.tome_static', '@account_switcher', '@file_system']
cache.tome_static:
class: Drupal\tome_static\StaticCache
arguments: ['@database', '@cache_tags.invalidator.checksum', 'tome_static']
arguments: ['@database', '@cache_tags.invalidator.checksum']
tags:
- { name: cache.bin }
tome_static.route_path_subscriber:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment