So I have cleanurl's enabled and one of my pages i have cached looks like so: /catalog/3?page=1
Now I am trying to expire pages manually through a conditional action and a url like above doesn't expire when i use:

$path='catalog/3?page=1';
if (boost_is_cached($path)) {
  boost_cache_expire_derivative(array($path));
  echo 'expired:'. $path;
} else {
  echo 'not cached';
}

The page is def cached like so:
catalog/3_page=1.html
but seems like BOOST cannot find it as I get 'not cached' from my script?

A regular url like
$path='catalog/3';
will delete the cached catalog/3_.html file

So how do I delete a url like above?

I found a related topic... but for people who want the /page/1 structure... I am happy keeping the default ?page=1 structure, just not sure how to get BOOST to expire it correctly.

Comments

armyofda12mnkeys’s picture

I got it to work doing it the more complicated way i didn't wanna do, but it works :). by installing the patch here:
http://drupal.org/node/897970#comment-3394566

Then I set it up so paginated urls like ?page=1 becomes page/1. Easiest way, I used the Clean Pagination module and enabling the pages on module's config page that i wanted to be 'Cleaned'. (in its settings, catalog/*, node, blog/*) ... (or seems like can do via templating which is somewhat covered in this thread: http://groups.drupal.org/node/3472#comment-31717)

Then bottom of Boost rules i added this so i think /page/1 links actual get rewritten to goto correct spot:
RewriteRule node/page/([0-9]*)$ ?page=$1 [L,QSA]
RewriteRule (.*)/page/([0-9]*)$ $1&page=$2 [L,QSA]

Now expiring $path='catalog/3/page/1'; in my code, BOOST knows what cache file to delete.

(supposedly Clean Pagination gets rid of the need for the rewrite rules above, but without rules above, C.Pagination module creates the links which look correct on the page, but clicking on them goes to ?page=1 url in browser address bar)

I'd still be interested if there is a way to do it so BOOST just knows how to store and handle ?page=1 url's.
I thought maybe it would... There is an option now for "Cache pages that contain URL Variables
Boost will cache pages that end with "?page=1" among others (anything with a "?" in the url)."
But i don't think boost_cache_expire_derivative() knows how to handle those urls still?, it didn't work with a '?page=1' url as stated in my first post.