|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* |
|
5
|
|
|
* This file is part of Phpfastcache. |
|
6
|
|
|
* |
|
7
|
|
|
* @license MIT License (MIT) |
|
8
|
|
|
* |
|
9
|
|
|
* For full copyright and license information, please see the docs/CREDITS.txt and LICENCE files. |
|
10
|
|
|
* |
|
11
|
|
|
* @author Georges.L (Geolim4) <[email protected]> |
|
12
|
|
|
* @author Contributors https://github.com/PHPSocialNetwork/phpfastcache/graphs/contributors |
|
13
|
|
|
*/ |
|
14
|
|
|
|
|
15
|
|
|
declare(strict_types=1); |
|
16
|
|
|
|
|
17
|
|
|
namespace Phpfastcache\Event; |
|
18
|
|
|
|
|
19
|
|
|
use Phpfastcache\Helper\UninstanciableObjectTrait; |
|
20
|
|
|
|
|
21
|
|
|
class Event implements EventInterface |
|
22
|
|
|
{ |
|
23
|
|
|
use UninstanciableObjectTrait; |
|
24
|
|
|
|
|
25
|
|
|
public const CACHE_GET_ITEM = 'CacheGetItem'; |
|
26
|
|
|
public const CACHE_GET_ITEMS = 'CacheGetItems'; |
|
27
|
|
|
public const CACHE_DELETE_ITEM = 'CacheDeleteItem'; |
|
28
|
|
|
public const CACHE_DELETE_ITEMS = 'CacheDeleteItems'; |
|
29
|
|
|
public const CACHE_SAVE_ITEM = 'CacheSaveItem'; |
|
30
|
|
|
public const CACHE_SAVE_MULTIPLE_ITEMS = 'CacheSaveMultipleItems'; |
|
31
|
|
|
public const CACHE_SAVE_DEFERRED_ITEM = 'CacheSaveDeferredItem'; |
|
32
|
|
|
public const CACHE_COMMIT_ITEM = 'CacheCommitItem'; |
|
33
|
|
|
public const CACHE_CLEAR_ITEM = 'CacheClearItem'; |
|
34
|
|
|
public const CACHE_WRITE_FILE_ON_DISK = 'CacheWriteFileOnDisk'; |
|
35
|
|
|
public const CACHE_GET_ITEM_IN_SLAM_BATCH = 'CacheGetItemInSlamBatch'; |
|
36
|
|
|
public const CACHE_REPLICATION_SLAVE_FALLBACK = 'CacheReplicationSlaveFallback'; |
|
37
|
|
|
public const CACHE_REPLICATION_RANDOM_POOL_CHOSEN = 'CacheReplicationRandomPoolChosen'; |
|
38
|
|
|
public const CACHE_CLUSTER_BUILT = 'CacheClusterBuilt'; |
|
39
|
|
|
public const CACHE_ITEM_SET = 'CacheItemSet'; |
|
40
|
|
|
public const CACHE_ITEM_EXPIRE_AT = 'CacheItemExpireAt'; |
|
41
|
|
|
public const CACHE_ITEM_EXPIRE_AFTER = 'CacheItemExpireAfter'; |
|
42
|
|
|
public const CACHE_GET_ALL_ITEMS = 'CacheGetAllItems'; |
|
43
|
|
|
public const CACHE_DRIVER_CHECKED = 'CacheDriverChecked'; |
|
44
|
|
|
public const CACHE_DRIVER_CONNECTED = 'CacheDriverConnected'; |
|
45
|
|
|
|
|
46
|
|
|
public static function getEvents(): array |
|
47
|
|
|
{ |
|
48
|
|
|
return (new \ReflectionClass(static::class))->getConstants(); |
|
49
|
|
|
} |
|
50
|
|
|
} |
|
51
|
|
|
|