• Resolved sbdermaceuticals

    (@sbdermaceuticals)


    Hello,

    I was hoping someone could help me out. I’ve been reading and researching, but can’t figure it out myself. I note upfront that the nature of the website content is adult so I have not provided the URL, but I can mark this NSFW and provide the URL if needed. Or provide screenshots that don’t show any mature content, such as from webpage.dev results.

    The issue is my website is loading slowly. Mostly the images take too long to load (especially at the bottom of pages) and pages show blank spots while the images near the bottom are loading. This happens on all pages: main, shop and individual product pages. I realize I might need an image optimization plugin to help things out, but I thought it should be loading faster with the cache in place.

    WP and all plugins are up to date.
    I only have one caching plugin in place: WP Super Cache
    The site is an ecommerce store with approximately 1227 products.
    Theme is Flatsome with lazy loading enabled by the theme.

    1. My tests show that static assets are not being cached, including the main css, js, and logos image, but I can’t find anything to change that in the general and advanced settings in WP Super Cache. (I am using Simple method as I don’t feel comfortable with editing .htaccess files and breaking something…) I can provide screenshots of this is needed.

    2. I have the cache settings set as follows:
    simple caching
    compress pages
    don’t cache known users
    cache rebuild
    browser caching
    extra homepage checks
    cache timeout: 86,400
    garbage collection: 14,400

    3. The site is mostly static, although I do update products about once a week, including weekly sales and weekly featured products.

    4. Although my footer widgets don’t update with these settings, at least the site is faster than with the default settings of cache timeout 3600/garbage collection 600. Unfortunately, I’m still having problems described above, pages loading with blank images for a few seconds on all pages. On product pages, the images often spin a few seconds before loading fully.

    My questions are:

    1. Am I doing something wrong with my settings?
    2. Should I enable preload?
    3. When I do update the site weekly, would I have to delete the entire cache and run preload again?

    Thank you in advance for any help.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Tamirat B. (a11n)

    (@tamirat22)

    Hi @sbdermaceuticals,

    Thanks for the detailed post; you’re on the right track with your setup. Here’s a breakdown of your key questions:

    Static Assets Not Being Cached

    WP Super Cache mainly caches full-page HTML, not individual files like CSS, JS, or images, so this is expected behavior. To improve the delivery of those static assets, consider enabling a dedicated CDN.

    Image Loading Issues

    The image delays you’re seeing are typically caused by large file sizes or lack of compression, not by page cache settings. As noted above, we recommend installing an image optimization plugin to optimize images and serve faster formats like WebP.

    Should You Enable Preload?

    With over 1,200 products, this can be resource-intensive, but if your hosting is solid, it’s worth testing. You don’t need to delete the full cache weekly. With preload mode enabled, portions of the cache will be cleared/deleted when posts are modified.

    Hope this was helpful! Please let us know if you need further assistance or if you have additional questions.

    Thread Starter sbdermaceuticals

    (@sbdermaceuticals)

    Thank you for the detailed reply. Regarding your answer:

    Static Assets Not Being Cached

    I’m glad to know I’m not doing something wrong with the static assets. I’m not sure if my host supports a CDN or not, but it is a dedicated server. I also wondered if a plugin that defers and/or concentrates css and js would help but I’m not sure if such a plugin would be compatible with WP Super Cache.

    Image Loading Issues

    I had a feeling we need an Image optimization plugin to improve things. Are there any recommendations that are compatible with WP Super Cache? Our host is a private company and there’s no built in cache, CDN or anything else of that nature to interfere. He did install WP Super Cache for us when he installed WordPress.

    Should You Enable Preload?

    We have a dedicated server. I have enabled preload before and set it to once every two days. I didn’t notice problems and this way, pages that haven’t yet been visited get cached. Is turning off garbage collection here recommended? It says this is the recommended setting.

    Do you think my advanced settings for cache timeout is long enough or should I set it higher?

    I’m going to start looking for an image optimization plugin and perhaps one to combine and defer css/ js if that’s recommended. To be honest, the site seems fairly fast except for the image loading issues. Thinking this should be my main concern right now.

    Once again, your reply and help are greatly appreciated!

    Plugin Support Tamirat B. (a11n)

    (@tamirat22)

    Hello @sbdermaceuticals

     I also wondered if a plugin that defers and/or concentrates css and js would help but I’m not sure if such a plugin would be compatible with WP Super Cache…..

    I had a feeling we need an Image optimization plugin to improve things. Are there any recommendations that are compatible with WP Super Cache?

    Depending on the exact nature of your site’ content, Jetpack’s Site Accelerator and Jetpack Boost, which are maintained by the same developers working on WP Super Cache, may be an option as long as the material does not violate our service guidelines regarding explicit content.

    —-

    Regarding your cache timeout settings, there’s no universal “perfect” number. For a site that updates weekly, a longer cache timeout is reasonable. You can experiment with gradually increasing that value to see what works best for your site.

    For preloading and garbage collection, yes, you can disable garbage collection, and is encouraged in our documentation. That said, if you ever encounter storage or performance issues, you can adjust these settings further.

    Hope this was helpful! Please let us know if you need further assistance or if you have additional questions.

    Thread Starter sbdermaceuticals

    (@sbdermaceuticals)

    Thank you for the quick and helpful reply. It’s greatly appreciated! I tested preloading, but the site seems to work better leaving if off for some reason. I will follow your advice and keep trying longer cache timeout settings to see if I can improve things more since the site doesn’t update much more than weekly.

    Just one more quick question please: Is it unreasonable to set the cache timeout to something as long as a week? I read about “nounces” and other plugins left the timeout to 10 hours for this reason, but I don’t see any mention of this in any of documentation and support threads for WP Super Cache. Should I just keep bumping it up (perhaps from 1 day to 2 days, etc.) and see what works best?

    I will also check out the Jetpack links you gave above. There’s tons of information there.

    Once again, thank you for all the help! It’s really great to get such good support.

    Plugin Support Tamirat B. (a11n)

    (@tamirat22)

    Hi @sbdermaceuticals,

    Yes, setting WP Super Cache’s timeout to a week is reasonable for static pages. Nonces (used in forms, carts, etc.) expire after 12 – 24 hours, so caching those pages longer can cause errors.

    Best approach:

    • For static pages: a week is fine.
    • For dynamic pages: keep cache timeout under 12 hours or exclude those pages via “Rejected URL Strings” in WP Super Cache settings.

    Also, while experimenting with an ideal number, just watch for issues on any interactive pages.

    Best,

    Thread Starter sbdermaceuticals

    (@sbdermaceuticals)

    I have the following pages excluded from caching:

    cart
    checkout
    account
    wishlist

    I will experiment with increasing the cache timeout on the rest and see how that goes.

    I currently have garbage collection set to 1/6 of the cache timeout. When I did the math on the examples in the documentation, it was 1/6, i.e, 3600 timeout/600 garbage collection. I just wanted to make sure that’s not “hard” on the server to have garbage collection set to 1/6 when the cache timeout is really long (days). As I indicated earlier, I do have a dedicated server, not shared hosting.

    Thank you again.

    Plugin Support Jen H. (a11n)

    (@jennywp)

    Hey @sbdermaceuticals,

    Those settings are probably generally safe on a dedicated server, but with a very long cache timeout (several days), the main concern is that cached files will pile up and only be cleaned after they’re expired. Also, with long timeouts, if your site contains a huge number of cache files, the garbage collection process could cause a bit of server strain as it scans and deletes expired cache files.

    Things to watch for and consider:

    • If you notice load spikes or slowdowns, consider reducing the cache timeout (so fewer files accumulate before expiry) or increasing the frequency of garbage collection (making the interval smaller, like 1/12 or 1/24 the timeout)
    • If cache files are not expiring often, infrequent garbage collection is fine, but if your site updates a lot, more frequent garbage collection helps keep content fresh for visitors

    Please let us know if you have any other questions. Cheers!

    Thread Starter sbdermaceuticals

    (@sbdermaceuticals)

    Thank you so much for that information. I wasn’t sure what garbage collection intervals were okay to use without stressing the server/site.

    Plugin Support Jen H. (a11n)

    (@jennywp)

    Hey again, @sbdermaceuticals! Our pleasure.

    I’ll go ahead and mark this as resolved now, but please do reach out in the future whenever you need us.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Need Help Configuring Cache Timeout & Preloading’ is closed to new replies.