elcobvg / laravel-opcache

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

File count limits? #15

Open heathdutton opened 5 years ago

heathdutton commented 5 years ago

I noticed that unlike the File cache, there is no folder structure created for the files. Does this mean there may be an IO overhead when caching millions of key/value pairs?

elcobvg commented 5 years ago

There are no files, it's an in-memory cache

heathdutton commented 5 years ago

Uhm... what? This library works by creating files that the opcache engine can load into memory. Similar to other cache engines used in Symfony. These files look like this:

Screen Shot 2019-07-10 at 9 42 13 PM

My concern is that they are all at a single folder level.

elcobvg commented 5 years ago

You're right. Though as you say, the files are loaded into memory. If you are dealing with millions of key/value pairs which won't all fit in available memory, there might be IO overhead to consider. I have never tested that, though. Creating subfolders might help, but I have very little time to work on any open source stuff at the moment.