Project

General

Profile

Actions

Feature #17258

closed

A better $TSFE->set_no_cache()

Added by Popy no-lastname-given over 17 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2007-04-27
Due date:
% Done:

0%

Estimated time:
PHP Version:
4.3
Tags:
Complexity:
Sprint Focus:

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)

Actions #1

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!

Actions #2

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.

Actions #3

Updated by Popy no-lastname-given over 17 years ago

but I am ready to listen some better solutions...

Actions #4

Updated by Elmar Hinz over 17 years ago

@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.

Actions #5

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

Actions #6

Updated by Elmar Hinz over 17 years ago

@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.

Actions #7

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...

Actions #8

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.

Actions #9

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.

Actions

Also available in: Atom PDF