You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to request a new API Function in ZenCache that would allow a site owner to clear the cache for a specific URL. We recently added one that allows you to clear a specific post ID, but it would be easier for most people if this could be extended to allow for a specific URL that they provide.
/*** This clears the cache for a specific URL.** @since 15xxxx Adding support for custom URLs.** @param string $url Input URL to clear.** @return int Total files cleared (if any).*/publicstaticfunctionclearUrl($url)
{
$regex = $GLOBALS[GLOBAL_NS]->buildHostCachePathRegex($url);
return$GLOBALS[GLOBAL_NS]->clearFilesFromHostCacheDir($regex);
}
Submit PR.
The text was updated successfully, but these errors were encountered:
Enhancement: Added a new API Function that allows a site owner to clear the cache for a specific URL via zencache::clearUrl($url);. See this article for further details. Props @kristineds. See Issue #590.
ZenCache v151114 has been released and includes changes from this GitHub Issue. See the v151114 announcement for further details.
This issue will now be locked to further updates. If you have something to add related to this GitHub Issue, please open a new GitHub Issue and reference this one (#590).
I'd like to request a new API Function in ZenCache that would allow a site owner to clear the cache for a specific URL. We recently added one that allows you to clear a specific post ID, but it would be easier for most people if this could be extended to allow for a specific URL that they provide.
API Functions That Exist Already
What I'd like to add...
Next Actions
New feature branch in the
websharks/zencache-pro
repo.After this line add a new method:
Submit PR.
The text was updated successfully, but these errors were encountered: