latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Quick Cache caching 404 not found pages

Home Forums Community Forum Quick Cache caching 404 not found pages

This topic contains 2 replies, has 2 voices. Last updated by  TJ 3 years, 12 months ago.

Topic Author Topic
Posted: Tuesday Jan 8th, 2013 at 10:46 pm #36673
TJ
Username: wellwater

Hi,

I’ve been experimenting with Quick Cache and I notice it’s caching 404 Not Found pages. In addition to that it’s sending header status code 200 (OK) for follow-up requests.

Is there anyway to disable caching of 404’s, which, by itself, would eliminate the 200 (OK) status code from being sent? I don’t mind applying a dirty hack directly to the source code.

Thanks.

  • This topic was modified 3 years, 12 months ago by  Eduan. Reason: Moved to the customer support forums

List Of Topic Replies

Viewing 2 replies - 1 through 2 (of 2 total)
Author Replies
Author Replies
Posted: Friday Jan 11th, 2013 at 7:00 am #36956
Bruce
Username: Bruce
Staff Member

Thanks for reporting this important issue

This has been addressed in the past, and Quick Cache does cache 404 pages for the sake of keeping robots from trying to access pages that don’t exist, and therefore this is the intended behavior. If, however, you’d rather not have this happen you can temporarily disallow caching through Quick Cache during runtime with the QUICK_CACHE_ALLOWED constant.

This would work:

<?php
if(is_404())
	define("QUICK_CACHE_ALLOWED", false);
&#91;/hilite&#93;

&#91;info_box&#93;
The above should go into a <a href="http://codex.wordpress.org/Must_Use_Plugins">Must-Use Plugin</a>.  You can accomplish this by first creating a .php

file with your favorite text editor, and pasting the code snippet above into the file. Then, you’ll need to upload the file via FTP to your /wp-content/mu-plugins/ directory. If you do not have this directory already, create it. After the file is created, the code will automatically fire.
[/info_box]

Posted: Friday Jan 11th, 2013 at 4:44 pm #37040
TJ
Username: wellwater

Thanks Bruce.

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

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.