Closing/terminating the cache
rquadling opened this issue · comments
Hi.
I'm just trying to see if there is a way to close/terminate/finalise a cache?
As far as I can see, any resources opened for a cache will be closed as part of the natural PHP script shutdown process, without any option to do this in "userland" (so to speak).
Is this right?
Which adapter do you want to close? The redis cache for example accepts the redis instance. You can close the connection yourself by calling https://github.com/phpredis/phpredis#close on it if you need to.
As far as I can see, any resources opened for a cache will be closed as part of the natural PHP script shutdown process, without any option to do this in "userland" (so to speak).
We don't keep (as far as I know) file descriptors open, so garbage collection deals with most resource de-allocation.