Response time estimation

I’m interested in adding the ability to estimate the amount of time it will
take for a ticket to be replied to when sending the auto-reply created by a
new ticket.

The nature of our support is very much cyclic, as we release new
products/updates or promotions the corresponding rise in support is pretty
dramatic. This means that the amount of time it will take to a ticket can
vary by quite a bit during these ‘stormy cycles’. We have a pretty good idea
as to the amount of time it takes to resolve a single ticket (we’ve kept
detailed stats on this for quite some time), so actually calculating the
response time is very straightforward. Actually counting the number of
open/new tickets is also (obviously) straightforward.

However, I do not want to execute a query everytime we open a ticket to
count the number of open/new tickets. That would be rather wasteful. Instead
I’d like to cache the value and update it at some predetermined interval.

Thus my question is : Is there some sane method of storing 'global’
variables that I’m not seeing? I obviously don’t want to attach this to the
session… I’m sure there is a very sane place to put this, but I’m just not
familiar enough with the code to know where it is.

Thanks,

Nick