Giter VIP home page Giter VIP logo

Comments (6)

khoaofgod avatar khoaofgod commented on May 19, 2024

You can use $cache->delete("keyword");
$cache->clean();

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.

from phpfastcache.

Jakobud avatar Jakobud commented on May 19, 2024

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

from phpfastcache.

Jakobud avatar Jakobud commented on May 19, 2024

Hmmm where is the cache.storage supposed to be? I don't see it at the same location as phpfastcache.php... My setup is:

require_once('phpfastcache/phpfastcache.php');
phpFastCache::setup('storage','auto');
$cache = phpFastCache();

Am I doing something wrong? Where else would the cache file be?

from phpfastcache.

khoaofgod avatar khoaofgod commented on May 19, 2024

if your php run as suPHP it will be in folder phpfastcache
if you're using DSO as PHP, it will be under /tmp or upload folder.

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:
phpFastCache::setup("path", dirname(FILE));

from phpfastcache.

fajarfariyanton avatar fajarfariyanton commented on May 19, 2024

how to save all cache to one folder , and not create one folder to one cache

from phpfastcache.

khoaofgod avatar khoaofgod commented on May 19, 2024

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

from phpfastcache.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.