[wp-hackers] Caching as part of the core

Almog Baku almog.baku at gmail.com
Sat Jul 21 11:17:33 UTC 2012


I think that if we will insert basic caching into the api it would fore the
plugins-developers to deal with caching.
Actually, it pretty simple- and the user will able to disabling this featue.
*
The base caching/optimization will include:*

   1. *minification: html, js, css:*

   *interface:
   *wp_enqueue_script( $handle, $src = false, $deps = array(), $ver =
   false, $in_footer = false, $minify=AUTO_MINIFY )
   wp_register_style( $handle, $src, $deps = array(), $ver = false, $media
   = 'all', $minify=AUTO_MINIFY )

   2. *combination: combine js, css files:*

   *interface:*
   wp_enqueue_script( $handle, $src = false, $deps = array(), $ver = false,
   $in_footer = false, $minify=AUTO_MINIFY, $combine=AUTO_COMBINE )
   wp_register_style( $handle, $src, $deps = array(), $ver = false, $media
   = 'all', $minify=MINIFY_DISABLED, $combine=AUTO_COMBINE )

   3. *basic object caching- at least as api interface without
   implemention!:*
   extending the object caching api: adding option to control the object
   caching within the development- like widgets, pages, etc

   *interface:*
   register_sidebar(array(
       'name'     => __( 'Post Sidebar'),
       'id'     => 'post-sidebar',
       ...
       'cache'    => AUTO_CACHE,
   ));
   register_nav_menus(array(
       'top_nav' => __( 'Top Navigation'),
       ...
       'cache'    => AUTO_CACHE,
   ));
   register_post_type('slider', array(
       'label' => __('Slider'),
       ...
       'cache'=> AUTO_CACHE,
   ));


Insert this minor changes into the api will able the caching plugins or
future core-caching-system to handle with caching!

On Sat, Jul 21, 2012 at 12:59 PM, Ryann Micua <ryannmicua at gmail.com> wrote:

> And the worst issue- the plugins today doesn't know how to deal with
>> caching.
>>
> How did you get to this conclusion? I may not have 8 years of development
> experience but I do know that caching is not a one click button that can be
> done (as of now) automatically.


More information about the wp-hackers mailing list