This also takes benefit of object reference to be used in multiple repository for same configuration. And in future library can add more options easily.
This also solve problem with PSR-6 implementation that cant be detected as redis/memcached to set the prefix separator, so user can manually specify it.
This also takes benefit of object reference to be used in multiple repository for same configuration. And in future library can add more options easily.
This also solve problem with PSR-6 implementation that cant be detected as redis/memcached to set the prefix separator, so user can manually specify it.
i.e. before
after:
or the cool PHP 8 way
Of course specifying repository still work like before:
The
$discord->cache
getter is removed though since at first time it is irrelevant and there can be different cache interfaces.I need opinion about the CacheConfig properties visibility though, either make it public to allow set/get or just allow getter/read only.