-
-
Notifications
You must be signed in to change notification settings - Fork 450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Manual cache file deletion? #35
Comments
You can use $cache->delete("keyword"); OR: Delete folder cache.storage , this folder is store at current location of phpfastcache.php if you are using CGI , suPHP, and it store at tmp / upload folder of server if you are using DSO. Read the document examples/2.setup.php , and you can setup custom path for this folder. |
Ah okay thanks! The cache.storage folder is what I was looking for. Specifically I was wanting to manually delete the cache file/folder at the command line or via SFTP. Thanks |
Hmmm where is the cache.storage supposed to be? I don't see it at the same location as
Am I doing something wrong? Where else would the cache file be? |
if your php run as suPHP it will be in folder phpfastcache phpFastCache doesn't want to border you about CHMOD 0777 for that folder, so it automatic pick a right way with good security and have writeable for you. If you want custom path for that folder, look at examples/2.setup.php <-- 🎯 You can do: |
how to save all cache to one folder , and not create one folder to one cache |
set the storage to "sqlite" , it will save to sqlite 1 - 2 files only. Because Linux / Windows directory only allow around 30,000 files I think. So, if you don't split them to multiple folder, the cache folder will dead after couple weeks, and also it's very diffucuti to clean up a folder have more than 10,000 files, slow and cost memory when reading everything from that folder. In real world, 1 folder contant all cache files is bad. Use "sqlite" / "memcached" / "memcache" if you don't want to deal with files. I suggest sqlite |
I just started messing around with this. Works great so far. I was wondering if it's possible to manually delete cache files when you are using filesystem storage as the caching type? I don't see where the cache files are stored on the file system.
There are some cases where I need to manually delete the cache and let my webpage rebuild the cache because a DB query was modified and I can't wait until the cache expires. Is the only way to delete the cache to call
$cache->delete()
?The text was updated successfully, but these errors were encountered: