Development

Changeset 7070

You must first sign up to be able to contribute.

Changeset 7070

Show
Ignore:
Timestamp:
01/16/08 07:32:20 (10 months ago)
Author:
Carl.Vondrick
Message:

sfLucene: reduced disk writes in categories (experimental due to writing files in destructor)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfLucenePlugin/trunk/lib/category/sfLuceneCategories.class.php

    r7023 r7070  
    5858 
    5959    $this->load(); 
     60  } 
     61 
     62  public function __destruct() 
     63  { 
     64    $this->save(); 
    6065  } 
    6166 
  • plugins/sfLucenePlugin/trunk/lib/indexer/sfLuceneIndexer.class.php

    r7069 r7070  
    136136  protected function addCategory($category, $c = 1) 
    137137  { 
    138     $this->getSearch()->getCategoriesHarness()->getCategory($category)->add($c)->getHolder()->save()
     138    $this->getSearch()->getCategoriesHarness()->getCategory($category)->add($c)
    139139  } 
    140140 
     
    146146  protected function removeCategory($category, $c = 1) 
    147147  { 
    148     $this->getSearch()->getCategoriesHarness()->getCategory($category)->subtract($c)->getHolder()->save()
     148    $this->getSearch()->getCategoriesHarness()->getCategory($category)->subtract($c)
    149149  } 
    150150 
  • plugins/sfLucenePlugin/trunk/lib/sfLucene.class.php

    r7069 r7070  
    396396    $this->getEventDispatcher()->notify(new sfEvent($this, 'lucene.log', array('Rebuilding index...'))); 
    397397 
    398     $this->getCategoriesHarness()->clear()->save()
     398    $this->getCategoriesHarness()->clear()
    399399 
    400400    $original = $this->getParameter('delete_lock', false);