Calendar::updateDurationCache PHP Method

updateDurationCache() public method

Update the calendar cache
public updateDurationCache ( $calendars_id )
$calendars_id integer calendar ID
    function updateDurationCache($calendars_id)
    {
        if ($this->getFromDB($calendars_id)) {
            $input['id'] = $calendars_id;
            $input['cache_duration'] = exportArrayToDB($this->getDaysDurations());
            return $this->update($input);
        }
        return false;
    }

Usage Example

Exemplo n.º 1
0
 function post_deleteFromDB()
 {
     // Update calendar cache
     $cal = new Calendar();
     $cal->updateDurationCache($this->fields['calendars_id']);
     parent::post_deleteFromDB();
 }