Ticket #2288 (closed defect (bug): fixed)
Reenable cache for safe_mode hosts
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| 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
Change History
comment:1
davidhouse — 6 years ago
- Keywords bg|2nd-opinion bg|dev-feedback added
We could have ENABLE_CACHE be a force-enable flag that skips the safe_mode check.
BTW, you can't use get_option() in the cache because the cache is loaded and initialized before everything except $wpdb.
comment:4
davidhouse — 6 years ago
- Keywords bg|has-patch added
Thanks for that info. Patch attached.
comment:5
markjaquith — 6 years ago
- 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
Note: See
TracTickets for help on using
tickets.


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?