Project

General

Profile

Actions

Bug #35237

closed

TCEMAIN.clearCacheCmd = pages/all not working for Editors

Added by Henrik Ziegenhain over 12 years ago. Updated almost 10 years ago.

Status:
Rejected
Priority:
Must have
Category:
Caching
Target version:
-
Start date:
2012-03-26
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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.

Actions #1

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.

Actions #2

Updated by Henrik Ziegenhain over 11 years ago

Confirmed for 4.5.22

This is very confusing.

Actions #3

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.

Actions #4

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.

Actions #5

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.

Actions #6

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.

Actions #7

Updated by Michael Stucki over 10 years ago

  • 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:
Actions #8

Updated by Thomas Mammitzsch almost 10 years ago

while that might be reasonable, there should be a hint/crosslink in the docs.

Actions

Also available in: Atom PDF