expire unread system notifications after a year. It would provide a better experience for infrequent visitors if we didn't expire them at all, but at some point we need to draw a line so as not to degrade system performance searching through old notifications that it's highly unlikely will ever be viewed again.
This commit is contained in:
parent
fa02f3a108
commit
df57e7ab93
@ -38,6 +38,13 @@ class Cron_daily {
|
|||||||
db_utcnow(), db_quoteinterval('30 DAY')
|
db_utcnow(), db_quoteinterval('30 DAY')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// expire any unread notifications over a year old
|
||||||
|
|
||||||
|
q("delete from notify where seen = 0 and created < %s - INTERVAL %s",
|
||||||
|
db_utcnow(), db_quoteinterval('1 YEAR')
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
//update statistics in config
|
//update statistics in config
|
||||||
require_once('include/statistics_fns.php');
|
require_once('include/statistics_fns.php');
|
||||||
update_channels_total_stat();
|
update_channels_total_stat();
|
||||||
|
Reference in New Issue
Block a user