@Seba,
To be honest, using SQLite as a cache is not a good idea at all.
I really do understand the challenges in your setup, but these challenges never change the facts that
a) Apache + HTTP/2 is
always worse when compared to Apache + Nginx (as proxy to Apache) + Nginx Cache (proxy cache),
b) SQLite as a key-value pair based cache is
always worse when compared to Memcached or Redis (with Redis being the most performant and flexible)
and that actually implies that you have
two (
mutually exclusive)
options:
1 - Apache + Redis, OR
2 - Apache + Nginx (as proxy to Apache) + Nginx Cache (proxy cache for certain requests) + MemCached/Redis (
only for request on a specific level),
and
option 2 is highly recommended and is to be preferred.
In essence, the second option is recommend and preferred due to the possibilities to
- allow Nginx to cache
responses (from Apache server upon unique requests) to
fast disk based cache for a (very)
long period, AND
- allow MemCached/Redis to cache
requests and responses (to and from Apache server) to
very fast memory based cache for a relatively short period, AND
- allow Nginx to set and/or activate
browser caching in order to have
client side caching for unique sessions,
and that way, you will have the best setup imageable, with Nginx + MemCached/Redis (and browser caching) to offload Apache server and minimize server side problems.
Note that Redis based (memory) cache is recommended over MemCached, since Redis server is a bit more advanced and will allow for some overflow of cached data, with the overflow of cached data ending up as
disk based cache automatically. MemCached is a basic caching mechanism that probably will not suit your needs.
Hope the above helps a bit........and if you want to, you can always send me a personal message via this forum.
Kind regards..............