Hyper Cache Help

Ask here your questions about Hyper Cache BUT after read the Hyper Cache page: that pages has a lot of information. If you need to asking for help sending piece of code or debug information that are too large for a comment, write me to info@satollo.net.

Of course, be clear when you leave a comment: add a good description of the problem, add the blog address on which you are experiencing problems (in the website field or in the comment text), use a valid email address in the email comment field, otherwise how can I help you???

My excuses for my bad english but it's the only way I have to communicate with you. Would you suggest a correction? Leave a comment, thank you!

405 thoughts on “Hyper Cache Help

  1. Manuel

    Hello Stefano, how are you? First I would like to thank you for such a great super cache plugin.

    On the WordPress site FolioVision has found a bug in the code and has posted a solution which I have tested and it works. Also evo252 has posted another option to add to the solution. I was wondering if you could release a version with this update after you tested it yourself of course.

    Here is the link http://wordpress.org/support/topic/cache-invalidation-issue-static-front-page?replies=17

    Once again thank you very much for your hard work and a great plugin.

    PS I have sent you an e-mail in regards to helping you edit your English translation on your website. I am still waiting for your reply if you are interested for my help.

    Reply
        1. mbrsolution

          Hi Alex to exclude a page or post simply enter the URI in WordPress Admin >> Settings >> Hyper Cache >> Uri to reject….

          Make sure that your URI starts with a / slash in front i.e /blog/

          I hope this helps you.

          Kind regards

          Reply
  2. roman

    Hi!
    WordPress 3.5.1
    Hyper Cache 2.9.1.2
    /wp-content/cache/hyper-cache (0777)
    No errors in the admin area. I come out of admin and I open the browser to the site. In the directory / wp-content/cache/hyper-tsache not appear any files and “Files in cache (valid and expired): 0″
    I tried to move a site to different hosting. Perhaps there is a conflict.
    How to find a mistake?
    Thanks!

    Reply
    1. roman

      The solution found. Blame plugin Fix Rss Feed V3.1.
      He changed the file wp-blog-header.php engine WordPress.

      Reply
  3. Jesus

    Hi Stefano and all,

    I have my HOME page as a static page on Settings –> Reading. But it is not properly cleared when I do a post modification, although I’ve done the modification proposed by FolioVision at http://wordpress.org/support/topic/cache-invalidation-issue-static-front-page?replies=3

    (And Cache invalidation mode -> Only modified post; and “Invalidate home, archives, categories on single post invalidation” is checked).

    Any ideas or help?

    Thanks in advance for your support.
    Jesus

    Reply
  4. Giacomo

    Hi Stefano,

    Hyper-Cache was not working for me because I use a different folder for plugins, so inside “advanced-cache.php” I had to change the include path to match mine.

    Thank you for this great plugin!

    Reply
  5. forlogos

    Hi Stefano,

    Long time user of this great plugin. Noticed that the latest version (2.9.1.2) says that it has not been tested on multisite – just want to let you know that I’ve been using it on a few multisite installs (with subdomains and subdomains mapped to other domains) for a while with no problems – it works flawlessly!!

    Question: is using the function hyper_cache_invalidate_post the best way to clear the cache for a specific page? I need the cache for a page post type to be refreshed/cleaned by a plugin

    Thanks!

    Reply
  6. Imidg

    Just recently, I upgraded plugin to 2.9.1.1 version and it stop to work. But I found that it start to write a file wp-contentadvanced-cache.php in a root instead of /wp-content/advanced-cache.php
    So, the bug is in plugin.php line #59
    look for
    $file = @fopen(WP_CONTENT_DIR . 'advanced-cache.php', 'wb');
    and replace it to
    $file = @fopen(WP_CONTENT_DIR . '/advanced-cache.php', 'wb');
    As you can see the difference – just a slash missing before advanced-cache.php

    After all, plugin works just fine for me: helps a lot and simple enough.

    Reply
  7. Alex Bohariuc

    Hello, i added the
    define cache true in wp-config but in the plugin settings it says:
    „You must add to the file wp-config.php (at its beginning after the <?php) the line of code: define('WP_CACHE', true);. ”

    Reply
    1. Imidg

      Just recently, I upgraded plugin to 2.9.1.1 version and it stop to work. But I found that it start to write a file wp-contentadvanced-cache.php in a root instead of /wp-content/advanced-cache.php
      So, the bug is in plugin.php line #59
      look for
      $file = @fopen(WP_CONTENT_DIR . 'advanced-cache.php', 'wb');
      and replace it to
      $file = @fopen(WP_CONTENT_DIR . '/advanced-cache.php', 'wb');
      As you can see the difference – just a slash missing before advanced-cache.php

      After all, plugin works just fine for me: helps a lot and simple enough.

      Reply
  8. Lorella

    Ciao Stefano, spero sei Itlaino perchè se devo scrivere Inglese povera me e infatti non capisco bene la guida.
    Io Uso la 2.8.0 per motivi di server e php ( win server- php 4) ho in una pagina mingle forum e non riesco ad invalidare la cache per quella pagina quindi se postano e escono da login non si vede. Purtroppo la cache non si pulisce automaticamente devo farlo a mano.
    Come posso escludere la pagina o il forum? Grazie mille.

    Reply
  9. Alex Nguyen

    I have a newspaper website which need to update information frequently (You can think about update more than 100 posts/day). I used W3 Total Cache, WP Super Cache and i think WP Super Cache worked just fine for me (only one project that i seem cached for category too long, need to clear the cache manually to refresh).

    However, i am using a low speed host and i need to improve the speed as much as possible. That’s why i give your plugin a try. Everything is OK except one important thing, sometime the data seem did not refresh if i don’t click on refresh button of the browser (i used your plugin parallel with DB Cache Reload Fix plugin)

    For the newspaper like my page, i wonder if you could show me what is the best setting to make sure that user always see the latest information?

    Thank you very much in advance.

    Reply
  10. Anthony Phillips

    Hello,

    I use your plugin often. I recently updated one of my clients WordPress installs to 3.5 and have found that Hyper Cache is not working, or maybe I am missing something.

    The _archives.dat file is created but no other files. The “Files in cache (valid and expired)” always shows “1″.

    So it seems pages are not actually being cached.

    Note: 3.5.1 has the same issue.

    Please correct me if I am wrong.

    Reply
  11. Евгений

    Hyper Cache создает кэшированные страницы, но при проверке работы плагина в конце исходного кода страницы отсутствует строка типа , подтверждающая, что страница взята именно из кэша. Так работает ли плагин в таком случае?

    Reply
  12. ahmad

    well the problem is that i can’t seem nor my cutomers to log out of the website.

    i used to go with w3tc but it actually slowed down the site for me so i moved to hyper cache and felt a great difference according to speed.

    i faced this issue while using w3tc but i solved it by excluding homepage out of cash. now i am using hyper cache and cloudflare but i cant log out my website. i am using a login/logout widget and it redirects to the home page on logout at all unless i clear the cache and then refresh the page.

    to be more specific i opened the site in a different browser and logged in as a customer then tried to logout from the homepage but it kept saying that i am logged in and when i press logout again it showed me a wordpress notification saying

    “You are attempting to log out of Natateef

    Do you really want to log out?”

    then i cleared the cash and refreshed the page and it showed that i am logged out.

    i tried this with “Home caching” checked and unchecked but it did not make any difference. i still can not logout untill i clear the cash! :S

    i did uncheck the “Redirect caching” option hoping that it would solve the issue but still it did not.

    i also did add a page rule at cloudflare to exclude my homepage from cashing so i know that it’s not a problem with cloudflare, actually it’s obvious because the status changes to logged out when i clear the cache in the hyper cache plugin.

    so please tell me how to solve this problem,
    best regards,
    Ahmad Afaneh.

    Reply
  13. JDanswers

    Hi Stefano.

    Looks like the autoclean is still not working on some of my sites. The date and time do not change unless I deactivate/activate the plugin. I re-enabled wp-cron to run and made sure the: define(‘WP_CACHE’, true); is in the head of wp-config as you instructed.

    I am at a loss as to why this is happening. Any ideas I can try?

    Thanks
    JD

    Reply
  14. lovelu

    Is there any way to disable hyper-cache only for single.php, so it is always fresh? I mean, I do not want to cache for Single file. Thanks.

    Reply
    1. Stefano Post author

      No there is no way. Single.php is only a template file, it can be called to generate posts, pages or even other type of custom post. In few words, single.php usually generates almost all the blog pages.

      Reply
  15. JDanswers

    HyperCache cleanup is not running as scheduled as the plugin sets it up when installing. I deactivated/activated and the date/time stamp changes as expected but the cleanup still does not run. In 48 hours the cache shows 151 items. I am assuming there should have been a cleanup within that 48 hours.

    Does HyperCache use WP Cron to run cleanup? I have WP Cron deactivated in the wp-config.php file. Could this be the problem?

    Thanks

    Reply
    1. Stefano Post author

      You should never disable the wp-cron otherwise if you use future post or other cron-based plugin you’ll have them not working.

      Reply
  16. Bryan

    I have a shopping cart widget in my sidebar, that is shown on every page. Is there a way to keep this information on the page dynamic while the rest is cached?

    Reply
  17. Plugin User

    I have mod_deflate compression statements in .htaccess Given that, should I enable compression with this plugin as well?

    Reply
    1. Stefano Post author

      You can set mod deflat to not compress the text/html mimetype to keep the compression enabled, or disable it.

      Reply
  18. fabien

    Hello again !
    It’s ok, I found the solution !
    I created my own version of your hyper_cache_invalidate_post($post_id) function into my plugin to invalidate and delete the cache page I need ;)

    thanks again for your plugin !

    Reply
  19. Fabien

    Hello Stefano !

    Really awesome plugin, I use it for a while, really nice.

    I have a question. I work on a plugin that display content inside a page or a post using a shortcode. But when the content provided by the shortcode change, of course the post or the page is not “modified” in the classic wodrpress way but I need to invalidate the post/page to regenerate the cache for it. Have you an idea how to do it ? Is there a method or a function I can call or a header value to pass to tell hyper cache that this page cache must be regenerate ? I looked into your code but I can’t figure how to do this…

    Thanks in advance for your help !
    And eagain, great plugin !

    Reply
  20. Ruud

    Hi Stefano,

    Installed Hyper Cache for 4 days, ever since statistics like NewStatPress and my own php stats (php line at the bottom of the page made in footer.php) decreased to 25%.
    Any idea to solve this ?

    Reply
    1. Stefano Post author

      If you want blog stats, do not install a cache or be sure your stats system is javascript (client side) based.

      Reply
  21. Joy Kumar

    Hi Stefano, we recently switched to Hyper cache (installed on http://free.com.bz/blog/ ) after running some benchmark results in comparison to W3 Total cache. With that cache we got a page speed loading time of 4.60 seconds for First View, and 0.46s for revisit. The First Byte was 0.45 seconds. Then we implemented Hyper cache and found that our page speed increased by almost 40% as compared to W3 total cache. Hyper cache benchmarks were: First View 3.35s, and and 0.44s for revisit. The First byte was within 0.26 seconds which is almost 40% lesser (and thus faster) than W3. With added plugin WP File Cache that works with Hyper Cache, we were further able to increase page speed of First View and decrease the First byte time.

    Your Hyper cache is really neat, easy on hands and lite-weight.

    SUGGESTION: Like W3, if you could please add function to cache database queries and object query cache, then we’ll not need to use extra plugin for the same.

    Thanks a lot for great plugin.

    Reply
    1. Stefano Post author

      Sorry but it is to complex to maintain. A query cache means going really deep inside WordPress code. Too deep.

      Reply
  22. csabi

    Hi

    I have an issue with Hyper Cache. My logs are full of this:
    [Sun Aug 05 10:35:43 2012] [error] [client 61.160.232.10] PHP Warning: fopen(domain_name/wp-content/plugins/
    hyper-cache/cache/0207fdb8c8100f96ef9f1301cc99f5b2.dat): failed to open stream: No such file or directory in domain_name/wp-content/plugins/hyper-cache/cache.php on line 295
    [Sun Aug 05 10:35:43 2012] [error] [client 61.160.232.10] PHP Warning: fwrite() expects parameter 1 to be resource, boolea
    n given in domain_name/wp-content/plugins/hyper-cache/cache.php on line 296
    [Sun Aug 05 10:35:43 2012] [error] [client 61.160.232.10] PHP Warning: fclose() expects parameter 1 to be resource, boolea
    n given in domain_name/wp-content/plugins/hyper-cache/cache.php on line 297

    (domain_name is an edit by me. originally it was the local path to the WP directory).

    Is there a problem with my configs or is it a bug?

    Reply
  23. Bob

    Stefano, thanks very much for making Hyper Cache available. I have used WP Super Cache at several websites for years, but changes in recent versions made it unreliable. I switched a new website I am developing to Hyper Cache a few days ago as a test and I am very pleased. Your instructions are clear (trivial English errors, but easy to understand). Installation and configuration are both simple. Best of all, everything works exactly as expected with no problems whatsoever.

    The new http://www.dorettasmith.com site where Hyper Cache is installed is a real estate website. There is still a considerable amount of work to do before it will be finished, but there are currently about 2600 real estate property listing pages. Some of those listings change each day. A CRON job runs wget with its –no-cache option after midnight each night to recursively reload each page and prime Hyper Cache for fast access during each following day. That works very well and cached pages load in remote client web browsers in about 1/3 the time required without caching.

    Reply
  24. Alexey Vesnin

    hi and good daytime! My question is : how can I specify a subnets or IP addresses to be bypassed by caching? For example : an external site crawling tool from a static IP I know must be served by WordPress without any caching. UserAgent bypass is not an option here – it can be changed or not specified at all. Thanks! :)

    Reply
  25. sert

    hello,

    my question Cached pages timeout

    2400 post, 8000 tags and 10k visitor

    how to set cached pages timeout value ?

    thanks

    Reply
    1. Andres

      Hi:
      I set the cache pages only for 2 recent days and works very well, now the server is not busy making and deleting cache of other days, specially with bots who generate a lot of “trash cache” of old posts.

      Try put this code in your header.php after and before tag:

      post_date)

      I waited many years to find that this cache configuration is the solution for sites with many visitors. I hope this can hel to you.

      Reply
    2. Andres

      Hi:
      I set the cache pages only for 2 recent days and works very well, now the server is not busy making and deleting cache of other days, specially with bots who generate a lot of “trash cache” of old posts.

      Try put this code in your header.php after wp_head(); and before body tag:

      (Write an open php sign here …)
      global $post, $hyper_cache_stop; if (strtotime($post->post_date) < strtotime('-2 days')) {$hyper_cache_stop = true;}
      (Write a close php sign here…)

      I waited many years to find that this cache configuration is the solution for sites with many visitors. I hope this can hel to you.

      Reply
      1. sert

        hello,

        Thanks for the information @Andres

        but did not understand :(

        how to set cached pages timeout value ?

        thanks

        Reply
        1. Andrés

          Hello sert:

          That is very clear to me. Just go to Settings >> Hyper Cache, and modify the field called “Cached pages timeout”:
          720 minutes is half a day, 1440 is a full day and so on. Is that your question?

          You would to set “Cache invalidation mode” in “Only modified posts” and put a check on “Invalidate home, archives, categories on single post invalidation” to keep always fresh your home page too.

          Reply
  26. Kevin

    Will clicking on the “clear cache” button mess up the website in anyway? I’ve always assumed that caching plugins cleared caches on their own every now and then anyway.

    And if it does sometimes mess up the website, what’s usually the reason?

    Reply
  27. Connie

    Hi Stefano,

    I’ve had Hyper Cache on casaveneracion.com for a long time and I love it.

    Question: I have a multi-site install on feastasia.com. Will Hyper Cache work on a multi-site install?

    Reply
    1. Fran

      Just my expérience here as I usually use Hyper Cache too and had to deal with a multisite install too.
      After some research, I found out that only the plugin Quick Cache works with multisite. I am satisfied with it.
      And in case you usually use WP Minify for minifying, it doesn’t work either with multisite. The one to use is then Better WordPress Minify.
      I hope this will help,
      Fran

      Reply
    2. Stefano Post author

      It should work since hyper cache stores the page in a codified file which comprises the host. But full cache invalidation will invalidate every page of every site.

      Reply
  28. natehc

    Hi Stefano. Thanks for the great plugin. we have an issue running it lately. When i mobile device accesses a blog page, the mobile page is cached and then also sent to all non mobile browsers.

    or if a non mobile browser visits a blog page first and caches the page, then the non mobile version is sent to mobile browsers.

    we have wp-touch pro installed on the blog also.

    Reply
    1. Stefano Post author

      You need to enable mobile detection on hyper cache and hope che wp-touch and hyper cache agents are the same (usually they are). Or you can configure the hyper cache user agents for mobile detection.

      Reply
  29. Giulio

    Hi Stefano,

    I use your plugin on all my wordpress installation.

    I have a strange problem after upgrade to last version. The problem is that if I enable the plugin all the site is displayed with strange symbol. Like square or / or &. All the site pages are displayed with only symbols and no image or word. As soon as I disable the plugin the site works well. If I reinstall the previous versione of hyper cache, the site works correct. Unfortunatly I can’t find no more the previous version and so I had to disable the plugin.

    Can you help me?

    Thank you

    Reply
  30. Fran

    Just sent a comment but it’s not displayed (???) So I do it again…

    Problem with the code added in wp-config.php
    When added, the wp site doesn’t work anymore : on backend and on frontend, I get the message :
    Parse error: syntax error, unexpected $end in /homez.483/aljabal/www/WordPress3/wp-config.php on line 1
    And I can’t even login anymore.

    I first added the code juste after the line define (‘WPLANG’, ‘fr_FR’);
    Then I tried to add it at the beginning, just after <?php
    Always the same error message

    For info, I used Hyper Cache on another wp website recently and it worked perfectly. I didn't have that problem when adding the code.

    Do you have an idea of what is not working ?

    Question Nr 2 (more general) :
    On our we backend, on the Hyper Cache page, the message says to add the code just after the line <?php but on your website here, you say to add it after the line define(WPLANG…)
    What the real best way ? and is it important ?

    Thanks for your attention,
    Fran

    Reply
    1. Fran

      I am very sorry for having written all this for nothing. Stefano, don’t hesitate deleting my comment and this reply.
      I don’t know what happened but when I re-tried this morning, all worked perfectly fine.
      Thanks again for a great great plugin

      Reply
    2. Stefano Post author

      A syntax error, means there are something wrong in the code added to wp-config.php. Try to start from the original and add the code again, may be copying from a working wp-config.php.

      Reply
  31. Fran

    Thanks Stefano for this good plugin !
    I have a problem though.
    I’ve used it successfully on one site and now I’m having an unexpected problem on another site –> http://www.aljabal.be/palestine_recitsdevoyages.html
    (this site is basically not WP, just html but the box within this page is a WordPress iframe)

    It’s all about the addition of code within wp-confing.php

    1) I added the code just after the line define(WPLANG, ”) as you advise on on website.
    Result, I get the following error message and I can’t login anymore :
    “Parse error: syntax error, unexpected $end in /homez.483/aljabal/www/WordPress3/wp-config.php on line 1 ”
    It’s weird because I di’dnt touch line 1 and it’s just the usual <?php

    I then tried to add the code at the beginning, just after the line <?php but I got the same error.

    The code I added is
    /** Pour plugin HYper Cache **/
    define('WP_CACHE', true);
    /** Fin **/
    It's the exact copy of the code I added on the first site, with which I have no problem

    Do you see what goes wrong ?

    2) More general question : On our wp dashboard, on the plugin page, the message says to add the code just after the line <?php and on your website you say to add it under the line define(WPLANG, ”)
    What is the real best way ? And is it important ?

    Thanks for your attention,
    Fran

    Reply
  32. Andy

    I’m trying to get Hyper-cache working on IIS hosting. I noticed that you said it takes some configuration tweaking to make it work but could not find any documentation of this. Google was unhelpful as well. Thanks!

    Reply
  33. Fran

    My page with comments is this one –> http://www.ajwan.net/wordpress/livre-dor/

    I just approved a comment. When connected, the new comment is displayed on the page but when I am not connected, the new comment is not displayed. No idea when it will be…
    How come ? An addition of comment is like a modification of post, right ?

    For info, in my Hyper Cache settings, I left all the settings to default. Which means that “Cache invalidation mode” is on “Only modified posts”.

    Can you help ?

    Reply
    1. Stefano Post author

      Yes you’re right, a comment should invalidate the page. My doubt is about comment approval from administrative side that may be does not call the “post modified” hook. I’ll check it.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>