Optionally disable inserts on boost_cache table

Gerhard Killesreiter - October 20, 2009 - 09:45
Project:Boost
Version:6.x-1.x-dev
Component:Caching logic
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

If one does neither use the cron clean up feature nor the built in crawler the boost_cache table is quite useless.

Disabling writes by using a blackhole table has improved the performance on our DB server quite a bit.

#1

mikeytown2 - October 20, 2009 - 18:13
Component:Expiration logic» Caching logic
Category:bug report» feature request
Status:active» needs review

This is more of a feature request rather then a bug report.

Once the file is created, it will never be overwritten; editing a node will not remove the old file. boost_cache_expire() uses the database instead of glob when flushing a node on edit. Your current setup is on the edge if this is slowing down you DB.

Anyway here's a patch... Key part is inside boost_cache_set() disabling

<?php
    boost_db_prep
($filename, $extension, BOOST_TIME + $expire);
   
boost_cache_set_node_relationships($GLOBALS['_boost_relationships']);
?>

If I get multiple requests for this (10+) or get paid, or if a better patch comes out I will commit it & support this feature request.

AttachmentSize
boost-609310.patch 3.91 KB

#2

mikeytown2 - October 21, 2009 - 03:32

#3

mikeytown2 - October 21, 2009 - 04:15

This isn't that painful to do actually... so here it is.

AttachmentSize
boost-609310.patch 7.61 KB

#4

mikeytown2 - October 23, 2009 - 02:56
Status:needs review» fixed

committed

#5

System Message - November 6, 2009 - 03:00
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.