Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
PersistentCache.php
1<?php
2declare( strict_types = 1 );
3
4namespace MediaWiki\Extension\Translate\Cache;
5
7interface PersistentCache {
9 public function get( string ...$keynames ): array;
10
11 public function getWithLock( string $keyname ): ?PersistentCacheEntry;
12
13 public function has( string $keyname ): bool;
14
15 public function hasEntryWithTag( string $tag ): bool;
16
17 public function hasExpiredEntry( string $keyname ): bool;
18
19 public function setExpiry( string $keyname, int $expiryTime ): void;
20
22 public function getByTag( string $tag ): array;
23
24 public function set( PersistentCacheEntry ...$cacheEntry ): void;
25
26 public function delete( string ...$keyname ): void;
27
28 public function deleteEntriesWithTag( string $tag ): void;
29
30 public function clear(): void;
31}
Represents a single result from the persistent cache.
Defines what method should be provided by a class implementing a persistent cache.