Add web cache to Onionoo's setup
The Onionoo service has become much more "popular" since Orbot started asking Onionoo for relay details a few weeks ago. As of today, Onionoo serves around 160,000 requests per hour to Orbot users. These requests are for roughly 1,000 different documents that are less than 4KB in size and updated once per hour. Up to 159,000 of these requests could be served by a cache.
Would it be possible to add something like Squid in front of Apache, or can we add some other caching mechanism to Apache so that it answers certain requests itself rather than forwarding them to Tomcat?
Is it possible to control this cache by making Tomcat add certain headers to its responses, like a suggested cache lifetime? The Tomcat application knows pretty well when a response is unlikely to change for 15 minutes and when it would be better to invalidate the cache entry after 5 minutes.