mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-09 01:25:22 +01:00
Use a constant for birthday cache time
This commit is contained in:
parent
e16f9676d4
commit
f7c45403ad
@ -23,6 +23,13 @@ use calendar_bo; // to_do: do NOT require it, just use if there
|
|||||||
*/
|
*/
|
||||||
class Contacts extends Contacts\Storage
|
class Contacts extends Contacts\Storage
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Birthdays are read into the cache, cache is expired when a
|
||||||
|
* birthday changes, or after 10 days.
|
||||||
|
*/
|
||||||
|
const BIRTHDAY_CACHE_TIME = 864000; /* 10 days*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int $now_su actual user (!) time
|
* @var int $now_su actual user (!) time
|
||||||
*/
|
*/
|
||||||
@ -1743,7 +1750,7 @@ class Contacts extends Contacts\Storage
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Cache::setInstance(__CLASS__,"birthday-$year-$addressbook", $birthdays, 864000 /* 10 days*/);
|
Cache::setInstance(__CLASS__,"birthday-$year-$addressbook", $birthdays, self::BIRTHDAY_CACHE_TIME);
|
||||||
return $birthdays;
|
return $birthdays;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user