Just a thought... cache.ram does have the potential drawback that if your server goes down, you lose that 24 hour history. May or may not be a problem in your situation - if it is then use something like cache_in_ram_and_disk() <https://web2py.com/books/default/chapter/29/04> to give you some fault tolerance.
JC --