Title: Extending WP Admin Cache
Last modified: November 9, 2019

---

# Extending WP Admin Cache

 *  [Jay Fraser](https://wordpress.org/support/users/loststudios/)
 * (@loststudios)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/extending-wp-admin-cache/)
 * I love your plugin!!!
 * I make mostly advanced web applications and PWAs using WordPress (often times
   where wp-admin is decoupled from the the theme layer). I move the “website owner
   admin” stuff onto the frontend. And then use wp-admin almost exclusively as a
   development environment.
 * I’m wondering if you are intending to expand your settings for WP Admin Cache
   to custom wp-admin pages. For people that build stuff with lots of CPTS, Post
   Relationships, Custom Tax, Custom Fields, etc… along with a lot of performance
   engineering – all from wp-admin, it would be nice to have the option to cache
   more than just the default pages you have in your settings panel.
 * Do you have any type of roadmap? Or perhaps could you share ideas you may have
   moving forward for this sweet little plugin?
 * Thanks again!
    -  This topic was modified 6 years, 6 months ago by [Jay Fraser](https://wordpress.org/support/users/loststudios/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [rojokuze](https://wordpress.org/support/users/rojokuze/)
 * (@rojokuze)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/extending-wp-admin-cache/#post-12237508)
 * I would love if this worked on custom pages
    -  This reply was modified 6 years, 5 months ago by [rojokuze](https://wordpress.org/support/users/rojokuze/).
 *  [menathor](https://wordpress.org/support/users/menathor/)
 * (@menathor)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/extending-wp-admin-cache/#post-12268141)
 * Same!
 *  [tomhung](https://wordpress.org/support/users/tomhung/)
 * (@tomhung)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/extending-wp-admin-cache/#post-12488502)
 * In the index.php file there is a getPageHooks function. At the end they array_pop(
   $a, ‘widget.php’); to add widget.php to the pre-fetch.
 * I added another array_pop($a, ‘post.php’); to pre-fetch while on page/post edit.
   This worked for me. It adds it to the options and I can select it. It would be
   nice to have it in the interface but hacking their code works.
 *     ```
           function getPageHooks() {
               global $admin_page_hooks;
               $a = array();
               foreach ($admin_page_hooks as $key => $value) {
                   if (strpos($key, '.php') !== false && strpos($key, '/') === false) array_push($a, $key);
               }
               $args = array('show_in_menu' => true);
               foreach (get_post_types($args) as $type) {
                   if ($type != 'attachment') {
                       $url = 'edit.php?post_type=' . $type;
                       if (!in_array($url, $a)) array_push($a, $url);
                   }
               }
               array_push($a, 'widgets.php');
               array_push($a, 'post.php');
               sort($a);
               return $a;
           }
       ```
   
 *  [rojokuze](https://wordpress.org/support/users/rojokuze/)
 * (@rojokuze)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/extending-wp-admin-cache/#post-12488746)
 * Thank you very much for this.
 *  [jazir5](https://wordpress.org/support/users/jazir5/)
 * (@jazir5)
 * [6 years ago](https://wordpress.org/support/topic/extending-wp-admin-cache/#post-12740927)
 * [@tomhung](https://wordpress.org/support/users/tomhung/)
 * Would you mind uploading the modified file so i can overwrite the one installed
   in the plugin? Greatly appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Extending WP Admin Cache’ is closed to new replies.

 * ![](https://ps.w.org/wp-admin-cache/assets/icon-256x256.png?rev=2047089)
 * [WP Admin Cache](https://wordpress.org/plugins/wp-admin-cache/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-admin-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-admin-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-admin-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-admin-cache/reviews/)

 * 5 replies
 * 4 participants
 * Last reply from: [jazir5](https://wordpress.org/support/users/jazir5/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/extending-wp-admin-cache/#post-12740927)
 * Status: not resolved