Make WordPress Core

Opened 20 years ago

Closed 20 years ago

Last modified 19 years ago

#2288 closed defect (bug) (fixed)

Reenable cache for safe_mode hosts

Reported by: juergen's profile Juergen Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.0
Component: General Keywords:
Focuses: Cc:

Description

Changeset 3436 disabled the cache when safe_mode is enabled. Why? It seems to work fine with a proper setup (manually created cache dir, proper dir permissions and safe_mode settings).

Attachments (1)

2288.diff (546 bytes) - added by davidhouse 20 years ago.

Download all attachments as: .zip

Change History (7)

#1 @davidhouse
20 years ago

  • Keywords bg|2nd-opinion bg|dev-feedback added

Agreed, there shouldn't be a blanket condition there. Could we change

if (ini_get('safe_mode')) 

to

if (ini_get('safe_mode') && get_option('safe_mode_no_cache'))

Then people with safe mode, who knew what they were doing, could just pop over to wp-admin/options.php (we wouldn't display this option by default in the admin) and change it to true?

#2 @ryan
20 years ago

We could have ENABLE_CACHE be a force-enable flag that skips the safe_mode check.

#3 @ryan
20 years ago

BTW, you can't use get_option() in the cache because the cache is loaded and initialized before everything except $wpdb.

@davidhouse
20 years ago

#4 @davidhouse
20 years ago

  • Keywords bg|has-patch added

Thanks for that info. Patch attached.

#5 @markjaquith
20 years ago

  • Keywords bg|2nd-opinion bg|dev-feedback bg|has-patch removed
  • Milestone set to 2.0.1
  • Resolution set to fixed
  • Status changed from new to closed

Fixed by [3462]

define('ENABLE_CACHE', true'); // put this in wp-config.php to force the cache to be on

#6 @(none)
19 years ago

  • Milestone 2.0.1 deleted

Milestone 2.0.1 deleted

Note: See TracTickets for help on using tickets.