The Aug. 6 dev version operates differently than the the July 28 dev version, which works as expected.

Clicking the Clear All Boost cached data: x pages button on the admin Performance page should remove all pages from cache and show 0 pages on the button text after being clicked.

I confirmed that all pages are deleted from the cache, but on the Aug. 6 dev version, I show 6 pages on the button display after clicking it. I cached 2 pages and the button display increment accordingly to show 8 pages cached.

I flushed one page using the Boost Block. The Button on the Performance admin page was not updated to reflect the one less page and still showed 8 pages. I clicked the clear All cache button on the Performance page and the button shows 6 pages cached.

CommentFileSizeAuthor
#2 boost-544002.patch1.06 KBTally
#1 boost-544002.patch1.04 KBmikeytown2

Comments

mikeytown2’s picture

Status: Active » Needs review
StatusFileSize
new1.04 KB

Thanks for finding this!

Tally’s picture

StatusFileSize
new1.06 KB

Almost! With the patch in #1, after clearing All Boost cached pages, the number reported in the button equaled all the table entries that had the base-dir value set, even though the cached files had all been deleted.

It appears that for $all == 0, the expire test was left out. The query should be as follows:

return db_result(db_query("SELECT COUNT(*) FROM {boost_cache} WHERE expire <> 0 and base_dir = '%s'", BOOST_FILE_PATH));

I added the expire <> 0 to the query and now the button is showing 0 pages after being clicked. The value increments and shows the correct number of cached pages as pages are cached.

Attached is a modified patch file (I am a newbie to php and Drupal and just modified your patch file. I did not create a new patch.)

mikeytown2’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for catching that. Tested and it works.

mikeytown2’s picture

Status: Reviewed & tested by the community » Fixed

Committed

Status: Fixed » Closed (fixed)

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