Another attempts to solve huge memory in v10 cache. This brings back the Collection (in-memory) caching behavior that used to exists in v7 and prior. While not 100% the same, this reduce one layer of abstraction to the cache interface.
To use on all repository, the option needs to be set null like this:
'cache' => [
AbstractRepository::class => null,
]
Or you can selectively choose the repository class, but I don't recommend mixing both ReactPHP's cache interface (including ArrayCache) with this way, unexpected behavior may happen.
I don't have big enough data to compare, but it is 18.8 MB vs 20.9 MB
BC:
CacheWrapper no longer exposes interface object to public, use the CacheConfig to get the interface
Discord::getCacheConfig() may returns null now
Another attempts to solve huge memory in v10 cache. This brings back the Collection (in-memory) caching behavior that used to exists in v7 and prior. While not 100% the same, this reduce one layer of abstraction to the cache interface.
To use on all repository, the option needs to be set
null
like this:Or you can selectively choose the repository class, but I don't recommend mixing both ReactPHP's cache interface (including ArrayCache) with this way, unexpected behavior may happen.
I don't have big enough data to compare, but it is 18.8 MB vs 20.9 MB
BC: CacheWrapper no longer exposes interface object to public, use the CacheConfig to get the interface Discord::getCacheConfig() may returns null now
Tested