elcobvg / laravel-opcache

Custom OPcache Cache Driver for Laravel. Faster than Redis, Memcache or APC.
MIT License
44 stars 12 forks source link

Sub cache directories features, availability for php >=7.0.4, additional config settings #7

Closed RomaGilyov closed 5 years ago

RomaGilyov commented 6 years ago

1) We will be able to set sub cache directories, usefull when we need to separate different cache parts, flush works recursively 2) OpCache are available from the 7.0.0 version and available for instal from 5.6 version, so no need set composer require php higher than 7.0.0, atherwise a lot of users won't be able to install it 3) Now we can set config('cache.stores.opcache.path') if it wasn't set the value from config('cache.stores.file.path') will be used 4) Compatibility with laravel >= 5.1

elcobvg commented 6 years ago

Thanks for your contributions. Making the package compatible with earlier versions of Laravel is very useful. However, I don't see the point of using sub directories (especially since flush will be recursive). What am I missing?

RomaGilyov commented 6 years ago

Thanks for reply. 1) Sub directories are very useful in case of debuging 2) In case when we need to delete specific cache for a certain functionality and we don't want to touch cache for other parts of a project (made flushSub() + flush now works with tags, so $store->tags(['animals', 'people'])->flush() will not have an impact on for example $store->tags(['animals']) as it states in the original Laravel documentation: https://laravel.com/docs/5.6/cache#cache-tags)

elcobvg commented 5 years ago

Apologies for the extremely late reply. I have been very busy the past few months. But many thanks for your contribution!