WordPress.org

Make WordPress Core

Changes between Initial Version and Version 10 of Ticket #21401


Ignore:
Timestamp:
12/01/2012 01:10:21 AM (9 years ago)
Author:
wonderboymusic
Comment:

I chatted with Jaquith earlier and he pointed out that half of this ticket made no sense - edited!

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #21401

    • Property Cc tollmanz@… mikeschinkel@… kpayne@… added
    • Property Type changed from defect (bug) to enhancement
    • Property Component changed from General to Cache
  • Ticket #21401 – Description

    initial v10  
    22
    331) introduces {{{wp_using_ext_object_cache()}}} - mimic {{{wp_suspend_cache_invalidation()}}} and disallow direct access to {{{$_wp_using_ext_object_cache}}}, cleans up importing of globals in functions and provides function to modify that global[[BR]][[BR]]
    4 2) allows {{{WP_CACHE}}} to load the wp-packaged object cache when {{{advanced-cache.php}}} and {{{object-cache.php}}} don't implement {{{wp_cache_init()}}}
    5 
    6 When '''define( 'WP_CACHE', true )''':
    7 
    8 As it stands, if you declare {{{WP_CACHE}}} = true, WP will try to load {{{advanced-cache.php}}} without checking if the file exists (it does the check for {{{object-cache.php}}}). {{{advanced-cache.php}}} shouldn't be required. Batcache is awesome, but at its core is just a handler for an output buffer. You should be able to mess with {{{object-cache.php}}} and not worry about {{{advanced-cache.php}}}. And by worry about I mean, have {{{WP_DEBUG}}} on and not get a warning / error.
     42) load the wp-packaged object cache when {{{object-cache.php}}} doesn't implement {{{wp_cache_init()}}}
     53) adds file_exists for advanced-cache.php
    96
    107{{{wp_start_object_cache()}}}, at its core, is on the hunt for {{{wp_cache_init()}}} and then sets the toggle for the external object cache. We only care about the external object cache if it has that function. Rather than throwing a fatal error if their is a missing method, load the default object cache.
    118
    12 If someone installs Batcache and Memcached properly, then nothing changes - files load, all is good. If they install 2 blanks files, the default Object Cache will load. If they install an external object cache without {{{wp_cache_init()}}}, the default cache loads.
     9If someone installs Memcached properly, then nothing changes - file loads, all is good. If they install a blanks file, the default Object Cache will load. If they install an external object cache without {{{wp_cache_init()}}}, the default cache loads.
    1310
    1411IMO - there is no reason to turn off non-persistent caching or throw a fatal error if the author of a cache plugin sucks or the user made a mistake in moving the files.