I am hosting a blog with Wordpress. The blog is simple, there’s no login available. The only dynamic content seems to be new blog posts and comments.
Due to lacking technical knowledge and time deficiency, I am not going to set up subdomains for static content and set my caching rules accordingly. So I am trying to make it work with caching all the content on my website.
The problem is that I don’t know what TTLs to set to my browser and edge caching to optimize both for speed and functionality, partly because I don’t know the exact caching logic. AFAIK edge caching is server-side and sets the rule for requesting fresh copy from server (in my case WP server) and browser caching is client-side and sets the rule for caching a local copy of the website.
My confusion stems from the fact that since new blog posts and comments is dynamic content that ideally should be displayed in real time (so not cached?) then my edge cache TTL can’t be high, because I need to request that dynamic content from my server. Is that correct? Because AFAIK browser cache TTL will not affect this dynamic content at all.
So if I understand it correctly, the following TTL schemes would yield following results:
- High edge cache (EC) TTL, high browser cache (BC) TTL -> optimized page load speed for longer time but dynamic content won’t be displayed quickly enough -> wouldn’t exactly work for me
- Low edge cache (EC) TTL, low browser cache (BC) TTL -> dynamic content gets refreshed often, but this comes at a cost of page load speed -> not optimized
- High edge cache (EC) TTL, low browser cache (BC) TTL -> probably the worst of both worlds (AFAIK), dynamic content doesn’t refresh often enough and I also lose in terms of page load speed
- Low edge cache (EC) TTL, high browser cache (BC) TTL -> not too sure about this variant, not sure how that would work in practice -> dynamic content refreshes often but also the page load speed is optimized?
There’s another thing I am not very aware of how to use for my benefit - purging. If I have set to cache everything then how purging could help here?
I plan to post 1-3x a week, for easier cache management I could set all my posts to be released only once per week on a specific day. Could you please advise how to set up my caching TTLs for optimized performance?