Bug #35237
closedTCEMAIN.clearCacheCmd = pages/all not working for Editors
0%
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.
Updated by Michael Bakonyi over 12 years ago
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.
Updated by Henrik Ziegenhain over 11 years ago
Confirmed for 4.5.22
This is very confusing.
Updated by Henrik Ziegenhain over 11 years ago
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.
Updated by Michael Bakonyi over 11 years ago
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.
Updated by Henrik Ziegenhain over 11 years ago
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.
Updated by Michael Bakonyi over 11 years ago
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.
Updated by Michael Stucki over 10 years ago
- Status changed from New to Rejected
- Assignee set to Michael Stucki
- Is Regression set to No
options.clearCache.pages = 1
- this is UserTS and permits a user to clear the page cacheTCEMAIN.clearCacheCmd = pages
- this is PageTS and tells what needs to be done upon saving a page
Updated by Thomas Mammitzsch almost 10 years ago
while that might be reasonable, there should be a hint/crosslink in the docs.