Title: Global overloading in advanced-cache.php
Author: Aaron Jorbin
Published: August 13, 2016

---

 [  ](https://profiles.wordpress.org/jorbin/) [Aaron Jorbin](https://profiles.wordpress.org/jorbin/)
4:26 pm _on_ August 13, 2016     
Tags: [4.6 ( 140 )](https://make.wordpress.org/core/tag/4-6/),
[Bootstrap/Load ( 5 )](https://make.wordpress.org/core/tag/bootstrap-load/), [dev-notes ( 647 )](https://make.wordpress.org/core/tag/dev-notes/)

# Global overloading in advanced-cache.php

As a part of the 4.6 release, a change is made to the [order of loading files](https://make.wordpress.org/core/2016/07/06/bootstrapload-updates-in-4-6/)
during the bootstrap process. This change included an attempt to protect sites from
the overloading of the hook related globals in `advanced-cache.php`. This change
was reverted with [[38251]](https://core.trac.wordpress.org/changeset/38251). This
means that the 4.5 behavior where if an `advanced-cache.php` sets one of the globals
to an empty array, previously entered records will not exist.

This is a general reminder to not directly touch the globals in WordPress and to
always use APIAPI An API or Application Programming Interface is a software intermediary
that allows programs to interact with each other and share data in limited, clearly
defined ways. functions. The format that the globals are in is not guaranteed to
stay consistent from version to version. If you need to interact with the Plugins
API in `advanced-cache.php`, as of 4.6, you can use the Plugins API (`add_action()`,`
add_filter()`, etc.).

### How to know if you are using `advanced-cache.php`

`advanced-cache.php` is a drop-in. If you are using any drop-ins, you will see “
Drop-ins” at the top of `wp-admin/plugins.php` as one of the filtering options. 
If `advanced-cache.php` is listed and no warning is displayed, your site is using
it. This file lives in your `wp-content` directory as a peer to `plugins` and `themes`.
Updates to it are not made like updates to plugins. You will never see a notice 
that there is an update pending. If you did not write this code yourself, you are
encouraged to keep up to date with upstream updates.

[#4-6](https://make.wordpress.org/core/tag/4-6/), [#bootstrap-load](https://make.wordpress.org/core/tag/bootstrap-load/),
[#dev-notes](https://make.wordpress.org/core/tag/dev-notes/)

### Share this:

 * [  Threads ](https://make.wordpress.org/core/2016/08/13/global-overloading-in-advanced-cache-php/?share=threads)
 * [  Mastodon ](https://make.wordpress.org/core/2016/08/13/global-overloading-in-advanced-cache-php/?share=mastodon)
 * [  Bluesky ](https://make.wordpress.org/core/2016/08/13/global-overloading-in-advanced-cache-php/?share=bluesky)
 * [  X ](https://make.wordpress.org/core/2016/08/13/global-overloading-in-advanced-cache-php/?share=x)
 * [  Facebook ](https://make.wordpress.org/core/2016/08/13/global-overloading-in-advanced-cache-php/?share=facebook)
 * [  LinkedIn ](https://make.wordpress.org/core/2016/08/13/global-overloading-in-advanced-cache-php/?share=linkedin)

 1. ![](https://secure.gravatar.com/avatar/cd257f389c91f137dab25f343b527123e887135b01921ebb6206e40cfa2eb636?
    s=32&d=mm&r=g)
 2.  [Knut Sparhell](https://profiles.wordpress.org/knutsp/)  6:13 pm _on_ August 13,
    2016
 3. Please change “advance-cache.php” in the h3 to “advanced-cache.php” to avoid any
    confusion.
 4. ![](https://secure.gravatar.com/avatar/1ccfcb1daa6c0b064e043799302012690fa5cfd4301d6e50bc08f2795cebe87b?
    s=32&d=mm&r=g)
 5.  [Gal Baras](https://profiles.wordpress.org/galbaras/)  9:51 am _on_ August 14,
    2016
 6. Will this affect WP Super Cache or WP Fastest Cache?
 7.  * ![](https://secure.gravatar.com/avatar/62ed6669556644a294591975f01137cd76ea6d1dcd8bf8b3328c1e2bf6e2a80d?
       s=32&d=mm&r=g)
     *  [Dion Hulse](https://profiles.wordpress.org/dd32/)  12:15 am _on_ August 15,
       2016
     * We’ve looked at the popular plugins and have seen no negative side effects for
       the existing versions of open-source caching plugins, nor have any issues been
       reported during the 4.6 development cycle.

Comments are closed.

# Post navigation

[← 4.6 Release Dry Run](https://make.wordpress.org/core/2016/08/13/4-6-release-dry-run/)

[This Week in 4.6: August 15 – 21 →](https://make.wordpress.org/core/2016/08/15/this-week-in-4-6-august-15-21/)