swayok / alternative-laravel-cache

Replacements for Laravel's redis and file cache stores that properly implement tagging idea
MIT License
169 stars 26 forks source link

refactor: determine hierarchy separator without creating connections #37

Closed dciprian-petrisor closed 2 years ago

dciprian-petrisor commented 2 years ago

After diving a bit deeper into the code, it seems the only problem is the hierarchy separator being different for the AlternativeLaravelCache/Store/AlternativeHierarchialFileCacheStore.php, as it is the only one which uses cache pools that inherit from HierarchicalCachePool (HierarchialFilesystemCachePoolFlysystem1 and HierarchialFilesystemCachePoolFlysystem3).

Therefore the most simple solution is to override the return value for that store and remove the original check.

I've also added a simple docker setup for running the existing tests easily.