Clear cache if a file doesn't exist
skilip - December 19, 2008 - 12:45
| Project: | jQuery Plugin Handler (JQP) |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
If a file doesn't exist, which is a common situation in a development environment, the cache has to be reset manually with the current version of jqp. The cache should be cleared if a file isn't found.

#1
#2
The problem with this is that it will add a whole lot of overhead if a plugin is missing or installed wrong. It will both clear and repopulate the cache on every page load -- without any interaction with the administrator to let him/her know that there's a (really big) performance problem going on.
I'd actually probably lean toward displaying an error but NOT refreshing the cache. Or only refreshing the cache once per minute or something...
#3
I agree there's a need of interaction when a plugin is not found. How do you think about using hook_cron for clearing the cache?
If a plugin isn't found, the user, only administrators if you will, will be prompted for the missing plugin. The message will tell the user he has to double check his plugin installation, and run cron for reinitializing the plugins.
#4
I'm thinking we're going to need a menu callback (something like admin/settings/jqp/clearcache) which we can use to have to admin manually clear the cache (similar to the cache clear on admin/settings/performance or devel's clear cache). The error would be permissioned and have a "clear plugin cache" link, so only users with "administer settings" (?) would be able to see it.
#5
This is possible already. Closing this issue