Feature #17258
closedA better $TSFE->set_no_cache()
0%
Description
Some plugins use the set_no_cache function, wich prevents caching, but, before this function is called, the tempCacheContent has been stored to cache table.
It should be better if the set_no_cache function call the clearPageCacheContent function
/**
* Sets the cache-flag to 1. Could be called from user-included php-files in order to ensure that a page is not cached.
*
* @param bool $clean = should clean tempPageContent ?
* @return void
*/
function set_no_cache($clean = true) {
if (!$this->no_cache && $clean) {
$this->clearPageCacheContent();
}
$this->no_cache = 1;
}
(issue imported from #M5517)
Updated by Michael Stucki over 17 years ago
Better don't do that, please.
I think we should get rid of this function as early as possible!
Updated by Popy no-lastname-given over 17 years ago
The problem is : a &no_cache=1 url parameter has not exactly the same effect than using TSFE->set_no_cache();
This is a problem when a cached plugin process incomming POST data (like a new message in a forum), because if two user send something at the same time, the second will see a "Page is being generated".
Using clearPageCacheContent will reduce the probability of this.
Updated by Popy no-lastname-given over 17 years ago
but I am ready to listen some better solutions...
Updated by Elmar Hinz over 17 years ago
Both &no_cache=1 AND TSFE->set_no_cache(); have to go. They are abused by extensions.
Sending POST data to a cached plugin is insane extension desgin. Please use a USER_INT. Consider to use a second plugin, if you need a cached part.
Updated by Popy no-lastname-given over 17 years ago
People who create insane extensions will continue even if we remove these features.
And that's not the problem, I make my own extensions and I don't know many people who do as "Cache compliant" and "Performance tunned" as me.
The problem is that this two features don't have the same effect
Updated by Elmar Hinz over 17 years ago
People can't proceed to make insane extensions in this point, because they would not work. You can only take a wrong road, if that road exists.
Updated by Popy no-lastname-given over 17 years ago
There's always a way to do insane extensions... you can't imagine what i did found on some french projects...
Updated by Elmar Hinz over 17 years ago
@Popy no-lastname-given: Bien sûre. But this killer of performance can be slain, which is a lot.
Updated by Tolleiv Nietsch over 13 years ago
- Category deleted (
Communication) - Status changed from Needs Feedback to Closed
- Target version deleted (
0)
Please use newsgroups for discussions. Closing the issue for the sake of a clean bugtrack - feel free to open it once this can make any progress.