Bug #35237
closed
TCEMAIN.clearCacheCmd = pages/all not working for Editors
Added by Henrik Ziegenhain over 12 years ago.
Updated almost 10 years ago.
Description
Hi,
the TS config options TCEMAIN.clearCacheCmd = pages and TCEMAIN.clearCacheCmd = all are not working for editors.
"User %s has cleared the cache (cacheCmd = pages) is written to BElog but the cache is not cleared.
Clearing a given PID works correct, also cache clearing as admin user works as expected.
Tested it with versions 4.5.13 and 4.5.7 - 4.6 seems not to be affected.
I can confirm this issue with 4.5.14.
TCEMAIN.clearCacheCmd = pages ist working when logged in as admin, but not as logged in editor.
Confirmed for 4.5.22
This is very confusing.
It's not a bug, it’s a feature. In the Documentation in the sources I found this:
- $cacheCmd='pages': Clears cache for all pages. Requires admin-flag to
- be set for BE_USER.
*
- $cacheCmd='all': Clears all cache_tables. This is necessary if
- templates are updated. Requires admin-flag to be set for BE_USER.
I never noticed, that this values needs a admin-Flag or a option to set.
Nevertheless, setting options.clearCache.pages = 1 solved this "bug".
The only thing is the logging. This is done, before the caches get flushed (or not). This is not optimal and could made better.
I think, this issue can be closed.
If we stick to "options.clearCache.pages = 1" this still forces the editor to manually clear the cache. Regarding usability it would be nice to let the system clear the cache for the editor. So I would like to keep this ticket open as feature request at least.
Michael, this is not correct at all I think.
With "options.clearCache.pages = 1" clearing caches via "clearCacheCmd = pages" is working for editors.
The function clear_cacheCmd() checks if the admin-flag is set OR options.clearCache.pages is true.
The function clear_cacheCmd() checks if the admin-flag is set OR options.clearCache.pages is true.
Ok I didn't know that, thx. Anyway – I don't think that options.clearCache.pages should be related to TCEMAIN.clearCacheCmd. Me as admin I would like to be able to set these options independently. But I don't want to complain. :) Maybe I'll be able to propose a patch, as soon as I find the time.
- Status changed from New to Rejected
- Assignee set to Michael Stucki
- Is Regression set to No
The feature works like it should:
options.clearCache.pages = 1
- this is UserTS and permits a user to clear the page cache
TCEMAIN.clearCacheCmd = pages
- this is PageTS and tells what needs to be done upon saving a page
References:
while that might be reasonable, there should be a hint/crosslink in the docs.
Also available in: Atom
PDF