The situation:
1. Anonymous user clicks on link to node/1234 (recently created) and gets "page not found" 2. Link works for logged in users. 3. Clear cache 4. Link now works for anonymous users 5. Note: there is* no* "page not found" error written to Watchdog
This is on a D5 install.
This makes no sense to me.
Is Drupal caching the non-existence of pages?
Isn't it supposed to work like this for anon users: URL is called, Drupal checks to see if there is a cached version. If there is, it gets the cached version, if not, it runs the queries and builds the page from scratch.
Thanks for solving this mystery,
Shai
On Thu, Apr 16, 2009 at 4:21 PM, Shai Gluskin shai@content2zero.com wrote:
Is Drupal caching the non-existence of pages?
Isn't it supposed to work like this for anon users: URL is called, Drupal checks to see if there is a cached version. If there is, it gets the cached version, if not, it runs the queries and builds the page from scratch.
I've seen similar stuff that I can't quite explain on a fairly large number of sites. Every now and then cron.php will get into the cache_page table as a 404. The only solution I have is to "delete from cache_page where cid like '%cron.php';"
One note - the cache is only used for anonymous users which explains why the authenticated users in step 2 of your scenario see the actual page.
If you have a way to get the step 1 (i.e. the 404 for anonymous that should actually be a page) I'd love to hear it. There's certainly a bug in here that we should solve.
Greg