Feature #17258
closed
A better $TSFE->set_no_cache()
Added by Popy no-lastname-given over 17 years ago.
Updated over 13 years ago.
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)
Better don't do that, please.
I think we should get rid of this function as early as possible!
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.
but I am ready to listen some better solutions...
@Popy no-lastname-given:
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.
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
@Popy no-lastname-given:
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.
There's always a way to do insane extensions... you can't imagine what i did found on some french projects...
- 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.
Also available in: Atom
PDF