ক্যাশ পরিষ্কার (Purge Cache)
System Tools-এর পেজ আর উপরের বারের বাটন, যা এই সাইট ও প্রতিটি Direct ফাইল সার্ভারের (নোডের মাধ্যমে) ক্যাশ ফোল্ডার, PHP opcache ও সেটিংস মেমরি খালি করে; যা থাকে (থাম্বনেইল, ব্রাউজার ও CDN ক্যাশ)।
BoxPuff keeps small things in memory and on disk so that pages are quick: the list of database tables, the settings, a few cached queries, the home page's numbers, and PHP's own compiled copies of the script (opcache). Normally they refresh themselves. After you upload new files of the script or of a plugin, change a setting straight in the database, or move a server, you may want them gone at once. Purge Cache does that, for this site and for every Direct file server, with one click.
Where it is
- Admin → System Tools → Purge Cache (
/admin/purge-cache) - the page, with a Purge All button at the top and a Purge Now button on every row. - The button in the admin top bar - the history icon (a clock with an arrow) beside Visit public site. It asks Purge every cache now?, purges everything and brings you back to the page you were on, with the result as a message at the top.
Only a full administrator can use either.
What is removed
On this site:
- the files
*.cacheand*.jsonunder/cache- the table list, settings snapshots and cached queries; - PHP's opcache, so edited script files are read again;
- the settings memory, the schema memory and the servers list held for the current request;
- the home page numbers (files, downloads, members), which are counted again on the next visit.
Nothing of your members' files, your settings values, your database rows, sessions or logs is touched.
Direct nodes
The page lists the server This site (or your Local Storage server) and every Direct file server, with its cache folder, status and an offline badge when it does not answer. A Direct server runs its own node.php with its own /cache folder and its own opcache, so the main site asks it through the node: Purge Now on its row, or Purge All, makes the node empty its cache folder and opcache and answer Removed N cached file(s) on <host>. One line per server is shown after the click, joined together; the message is green only when every server answered well. A Direct server that is offline, or whose node.php is older than 1.2.0 and does not know the call, answers with an error and the others are still purged.
FTP, SFTP and bucket servers (S3, Wasabi, Backblaze and the rest) keep no cache of the script's, so they are not listed.
Each purge is written to the action log as Cache purged (every server) or (one server).
What is not removed
The page's second card names three things on purpose:
- Thumbnails. The File Previewer's pictures under
uploads/thumbsstay; its page has a Rebuild thumbnails job (File Previewer). - The browser's cache. Stylesheets and scripts carry a version in their address, so visitors get new ones on the next page view without clearing anything.
- A CDN in front of the site (Cloudflare and the like). Purge it from its own panel after an update.
When to use it
- Right after updating: upload, run
db_update.php, then purge. - After adding or replacing a plugin or theme by FTP.
- After changing a row of
bp_settingsin the Database Browser, which the settings memory does not see. - When a Direct server shows an old behaviour after its
node.phpwas replaced: opcache keeps the old copy until it is reset.
Tips
- It is safe at any time; the only cost is that the next few pages are a little slower while the caches fill again.
- Purge caches on System Update, the dashboard's Purge & Resync All Assets and the one on Manage Plugins clear this site's caches only; this page also resets opcache and is the one that reaches the Direct nodes.