Recently Browsing 0 members
No registered users viewing this page.
This is a new module that provides a simple solution to clearing all your cache layers at once, and an extensible interface to perform various cache-related actions.
The simple motivation behind this module was that I was tired of manually clearing caches in several places after deploying a change on a live site. The basic purpose of this module is a simple Clear all caches link in the Setup menu which clears out all caches, no matter where they hide. You can customize what exactly the module does through it's configuration menu:
Expire or delete all cache entries in the database, or selectively clear caches by namespace ($cache API) Clear the the template render cache. Clear out specific folders inside your site's cache directory (/site/assets/cache) Refresh version strings for static assets to bust client-side browser caches (this requires some setup, see the full documentation for details). This is the basic function of the module. However, you can also add different cache management action through the API and execute them through the module's interface. For this advanced usage, the module provides:
An interface to see all available cache actions and execute them. A system log and logging output on the module page to see verify what the module is doing. A CacheControlTools class with utility functions to clear out different caches. An API to add cache actions, execute them programmatically and even modify the default action. Permission management, allowing you granular control over which user roles can execute which actions. The complete documentation can be found in the module's README.
Note that I consider this a Beta release. Since the module is relatively aggressive in deleting some caches, I would advise you to install in on a test environment before using it on a live site.
Let me know if you're getting any errors, have trouble using the module or if you have suggestions for improvement!
In particular, can someone let me know if this module causes any problems with the ProCache module? I don't own or use it, so I can't check. As far as I can tell, ProCache uses a folder inside the cache directory to cache static pages, so my module should be able to clear the ProCache site cache as well, I'd appreciate it if someone can test that for me.
If there is some interest in this, I plan to expand this to a more general cache management solution. I particular, I would like to add additional cache actions. Some ideas that came to mind:
Warming up the template render cache for publicly accessible pages. Removing all active user sessions. Let me know if you have more suggestions!
https://github.com/MoritzLost/ProcessCacheControl ProcessCacheControl in the Module directory
I am using ProCache v3.1.8 on ProcessWire 3.0.96.
Everything worked fine in the past, but today I noticed that the css file serverd by procache gives a 410 error.
The file is there, I checked.
I deleted the cached files, I deleted the css file, I looked into the .htaccess file looking for some clues about this problem but nothing worked.
The only way i can see my website correctly again is disabling ProCache.
Has anyone any clue on what could be the cause of the problem or on what should I do to fix it?
Hy Processwire community,
There are some problem in fileCompiler cache.
when i change under the directory \site\templates\ it must change under the directory /site/assets/cache/FileCompiler/site/templates/
but it does not update and functionality working with /site/assets/cache/FileCompiler/site/templates/ directory.
In this case please suggest me how i clear fileCompiler cache?
what i have to clear it manually?
I am building my website, which has a dozen projects with 10 images each. Basically, I need a filtering system but built in the most efficient and user-friendly way. You can see below that the images flow sideways so being hidden, JS lazy loading was a good tool, but I just wanted to try AJAX. Is it fit for this purpose or it's more for dynamic content?
I have two Page Reference fields: Category and Subcategory. Category is parent of Subcategory, and can have 0 to n Subcategories. Fields are selected by dropdown selection.
I'm trying to achieve following logic:
1. Select Category (obviously works)
2. Change Subcategory options based on selected Category (this works)
3. Hide the Subcategory field if Category has no Subcategories (to prevent weird dropdown with nothing to select)
I have tried to investigate two possible alternatives to achieve step 3:
A) Make dynamic condition into Subcategory selection's "Only visible if..." field
B) Make a hook that fires when Category changes, then hides Subcategory field if Category has no children
So far I haven't been successful in either. Conditions I've tried always lead to hidden field, and I haven't been able to find set up a hook that fires on field change.
So here's the question (finally): Is there a way to alter field visibility in API, for example in ready.php or inside a hook? In API I could loop through categories, find the ones that have children and then make a selector based on their IDs.