Ticket #2288 (closed defect (bug): fixed)

Opened 6 years ago

Last modified 5 years ago

Reenable cache for safe_mode hosts

Reported by: Juergen Owned by: anonymous
Priority: normal Milestone:
Component: General Version: 2.0
Severity: normal Keywords:
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

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

Change History

  • 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?

comment:2   ryan6 years ago

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

comment:3   ryan6 years ago

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

  • Keywords bg|has-patch added

Thanks for that info. Patch attached.

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

Fixed by [3462]

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

Milestone 2.0.1 deleted

Note: See TracTickets for help on using tickets.