Title: [Plugin: WP Super Cache] Dynamic Cache not working
Last modified: August 19, 2016

---

# [Plugin: WP Super Cache] Dynamic Cache not working

 *  [hawaiifi](https://wordpress.org/support/users/hawaiifi/)
 * (@hawaiifi)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-dynamic-cache-not-working/)
 * Wp Super Cache works great until I add the following to my head.php file:
    ` 
   <!--dynamic-cached-content--><?php youAreHere($post->ID); ?><!-- youAreHere($
   post->ID); --><!--/dynamic-cached-content-->  Now when I test the cache I get
   the following message:
 * **The pages do not match! Timestamps differ or were not found!**
 * And the pages on my site are blank.
 * The function I am trying to call is in my functions.php file. The following works
   with WP Super Cache turned off:
    ` function youAreHere($postid){ //This creates
   the breadcrumb if(function_exists('zg_recently_viewed') && isset($_COOKIE["WP-
   LastViewedPosts"])){ $crumb = zg_recently_viewed($postid); }else if(function_exists('
   bcn_display')){ $crumb = '<p class="breadcrumb">**You Are Here:**  '.bcn_display().'
   </p>'; } return $crumb; }  I’m using PHP to cache.
 * Is there a better javascript solution to call the php using $post->ID where I
   can use mod_rewrite?
 * Mahalo for the help.

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

 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-dynamic-cache-not-working/#post-1947738)
 * Enable “Late init” on the advanced settings page. There’s a FAQ about it in the
   documentation.
 *  [anchel](https://wordpress.org/support/users/anchel/)
 * (@anchel)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-dynamic-cache-not-working/#post-1947739)
 * Same here … I Get
    <!– File not cached! Super Cache Couldn’t write to: ” full
   path … ” –> In debug I see that the files couldn’t write to /wp-content/cache/
   supercache After delete of this folder it isn’t rebuilding again .. Or after 
   making this folder right with permissions it’s also giving the error . Switching
   php or mod_rewrite makes no difference .. or Late init …
 * Cheers,
    Michel [http://skilfan.anchel.nl](http://skilfan.anchel.nl)
 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-dynamic-cache-not-working/#post-1947842)
 * anchel – your problem is different to the previous one. Unfortunately I can’t
   help as there’s a permission problem on your server.
 *  [anchel](https://wordpress.org/support/users/anchel/)
 * (@anchel)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-dynamic-cache-not-working/#post-1947844)
 * ok you say so … Have it on 4 blogs …
 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-dynamic-cache-not-working/#post-1947859)
 * Are the 4 blogs on the same host or server? You need to check the folders on 
   your server, and check the modules loaded by your webserver. Maybe there’s some
   security module that will only allow PHP to write to files owned by the same 
   owner. There are lots of reasons why you’re getting this problem unfortunately.
 *  [anchel](https://wordpress.org/support/users/anchel/)
 * (@anchel)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-dynamic-cache-not-working/#post-1947884)
 * Yes same host .. but it’s after upgrading to 0.9.9.9 and if I delete cache folder
   in the wp-content .. the plugin creates a new folder cache with meta in it but
   no supercache folder …
    Thats strange ..
 *  [anchel](https://wordpress.org/support/users/anchel/)
 * (@anchel)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-dynamic-cache-not-working/#post-1947893)
 * Reinstalled 0.9.9.8 and it’s back up and running …
    supercache folder is created
   and works fine ..
 * sorry to say .. something in 0.9.9.9 is broken ..
 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-dynamic-cache-not-working/#post-1947923)
 * Odd, that works fine for me and everyone who was testing the dev version. Grr.
 * If you can, install the latest version on one of your blogs and try to debug 
   around line 405. That’s the only chunk of code that changed between the two versions
   that might cause a problem for you. Thanks.
 *  Thread Starter [hawaiifi](https://wordpress.org/support/users/hawaiifi/)
 * (@hawaiifi)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-dynamic-cache-not-working/#post-1947955)
 * Thanks for the help donncha. I tried what you said:
    1. Set $wp_super_cache_late_init to “1” in wp-content/wp-cache-config.php
    2. Enable “Late init” on the advanced settings page.
 * And now I get this error when I test my home page:
 * **Parse error: syntax error, unexpected T_STRING in /home/gom/public_html/wp-
   content/plugins/wp-super-cache/wp-cache-phase1.php(204) : eval()’d code on line
   96**
 *  Thread Starter [hawaiifi](https://wordpress.org/support/users/hawaiifi/)
 * (@hawaiifi)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-dynamic-cache-not-working/#post-1947956)
 * I also tried in Legacy mode and get the same error.
 * If I use this bit of code instead:
 *     ```
       <!--mfunc youAreHere($post->ID); -->
       <?php youAreHere($post->ID); ?>
       <!--/mfunc-->
       ```
   
 * The error goes away, but the pages are still blank.
 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-dynamic-cache-not-working/#post-1947958)
 * hawaiifi – look at the cached file and you might see the syntax error generated.
   You might need to use the debug file to find out what cache file to look for.
 * Also, $post doesn’t exist when cached as the loop doesn’t run. 🙁 You’ll have
   to cache that somehow when the page is generated.
 *  Thread Starter [hawaiifi](https://wordpress.org/support/users/hawaiifi/)
 * (@hawaiifi)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-dynamic-cache-not-working/#post-1947963)
 * $post->ID appears to be the culprit creating the error. I was able to solve this
   by echoing the commented lined using PHP like so:
 * `<?php echo '<!--mfunc youAreHere('.$post->ID.'); -->'; ?>`
 * But when a page is cached, my function is still not working. Do I need to make
   sure funtions.php is not cached? How would I do that?
 * Should I just be using AJAX to call this function? It seems like that would allow
   me to turn off “Late init” and get things loading even faster.
 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-dynamic-cache-not-working/#post-1947970)
 * Yeah, ajax is better for this sort of thing!
 * anchel – thanks for letting me into your server to investigate. The problem was
   that you had capital letters in your filesystem path and a unicode fix in .9 
   was to lowercase everything. I fixed this by lowercasing only the URI.
 * To fix this on your other blogs grab [wp-cache-phase1.php](http://svn.wp-plugins.org/wp-super-cache/trunk/wp-cache-phase1.php)
   and copy it into wp-content/plugins/wp-super-cache/, overwriting the file of 
   the same name there.
 *  [anchel](https://wordpress.org/support/users/anchel/)
 * (@anchel)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-dynamic-cache-not-working/#post-1947973)
 * Thanks for the fix! Great Job.
 * Cheers from Holland.
 *  [Inposure](https://wordpress.org/support/users/liangzai/)
 * (@liangzai)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-dynamic-cache-not-working/#post-1948015)
 * Speaking of Capital letters, it seems that super cache doesn’t care about capital
   letters in escape sequences. I have the following URI on my site:
 * /om-%25e4%25b9%258b%25e4%25b9%258e%25e8%2580%2585%25e4%25b9%259f
 * But sometimes, through stupid “normalization” by bots and clients, this becomes:
 * /om-%25E4%25B9%258B%25E4%25B9%258E%25E8%2580%2585%25E4%25B9%259F
 * This is cached as a separate instance by super cache.
 * Not a big deal, but something that can’t easily be changed on the htaccess level.

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

The topic ‘[Plugin: WP Super Cache] Dynamic Cache not working’ is closed to new 
replies.

 * ![](https://ps.w.org/wp-super-cache/assets/icon-256x256.png?rev=3506220)
 * [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-super-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-super-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-super-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-super-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-super-cache/reviews/)

 * 15 replies
 * 4 participants
 * Last reply from: [Inposure](https://wordpress.org/support/users/liangzai/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-dynamic-cache-not-working/#post-1948015)
 * Status: not resolved