Allow "loopback" connections to bypass the cache (untested)

RewriteCond  REMOTE_ADDR == SERVER_ADDR [OR]

When page is expired, it's added to the crawler list instead of being flushed. This is useful if fast & stale is better then slow & fresh.

Comments

mikeytown2’s picture

The server IP needs to be hard coded, in order for this to work; from what I can tell.

  RewriteCond %{REMOTE_ADDR} ^127\.0\.0\.1$ [OR]
echo str_replace('.', '\.', $_SERVER['SERVER_ADDR']);
mikeytown2’s picture

Status: Active » Postponed

not sure if this will ever be committed, but its here.

mikeytown2’s picture

Status: Postponed » Active

First step is to make htaccess generation more tailored to the current settings. Make a note that a particular setting effects the htaccess generation.

Froggie-2’s picture

@mikeytown: Is it a bad idea to leave cached pages as it is permanently without any expiry date/time, until the page gets updated or modified? What I mean is to have a page expire from cache if and only if it is updated. This will help save a lot of server resources...

mikeytown2’s picture

@Froggie
There is a global setting for that; here is the patch that makes it work correctly #566106: boost_has_site_changed() function not working.
Enable the "Expire content on cron only if the sites content has changed." checkbox.

In a more specific manner you can select different expiration times for different content types with the "Boost: Pages cache configuration" Block. So for nodes do something like 52 weeks and for views do 1 hour, front page do 1 min. Not expiring pages that contain multiple nodes, like views/panels (#453908: Hook for panel node types - expiration of static cache; panel containing multiple nodes), is a bad idea. Also if you have dynamic content, then a low expiration time is a good idea, otherwise that dynamic info will not be updated.

Froggie-2’s picture

@Mikeytown: Thank you very much for the latest information and updates. I am looking forward to install the latest version sometime soon. Best Regards

mikeytown2’s picture

Inside boost_cron(): Bypass cache expiration and load to be expired content in the crawler.

mikeytown2’s picture

Status: Active » Needs review
StatusFileSize
new12.09 KB

First step done. Rules get selectively generated based on settings.

mikeytown2’s picture

StatusFileSize
new14.2 KB
mikeytown2’s picture

StatusFileSize
new14.4 KB

Whats left to do is put in the logic so crawler loads up the correct URL's and cron doesn't clear the expired cache.

mikeytown2’s picture

Status: Needs review » Active

patch is in with checkbox commented out.

mikeytown2’s picture

Title: IP Address Bypass in htaccess » Bypass cron expiration & load to be expired urls into crawler
mikeytown2’s picture

Component: Apache integration » Miscellaneous
mikeytown2’s picture

Status: Active » Needs review
StatusFileSize
new7.47 KB

did it

mikeytown2’s picture

StatusFileSize
new8.21 KB

works on windows now as well

mikeytown2’s picture

Status: Needs review » Fixed

committed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.