Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter iaudio

    (@iaudio)

    @vmarko I think the above approach can work and I will close this thread off.

    The next issue I need to resolve is updating the download URL for Woocommerce guest users, since their downloads are accessed through a separate wc_endpoint_url. However, that is well outside the scope of this thread.

    Thanks for your help!

    Thread Starter iaudio

    (@iaudio)

    @vmarko thanks, I will let you know early next week after I have had a chance to test this over the weekened.

    Thread Starter iaudio

    (@iaudio)

    Hullo,

    Assuming it is just changing the download path, e.g. https://electriccanyon.com/account/downloads/?download_file=string

    The Woocommerce download URL can be updated to do this.

    In that case would excluding the /account location through Nginx be enough, or would there be additional config needed on the W3TC side?

    Would the above work?

    Thread Starter iaudio

    (@iaudio)

    Hi Marko,

    Which part of the domain are you suggesting changes? The /path or the root domain?

    For example https://electriccanyon.com/?download_file=random-string or an entirely new domain?

    Is there no way of excluding the path from the page cache?

    Thread Starter iaudio

    (@iaudio)

    Hi there,

    The Electric Canyon site was built nearly nine years ago, but has been maintained and updated in that time. The site has an e-commerce store where customers can purchase sound files.

    Site behaviour:

    • Users browse the store page.
    • Both registered and guest checkout are supported.
    • Logged in user sessions are configured not to cache.
      • This is why product downloads for logged in users always work.
      • Guest users/unauthenticated users will encounter the cached file issue

    The page information:

    Technical Details:

    • The site is proxied through Traefik to Nginx reverse proxying WordPress via fastCGI.
      • W3TC writes to a Nginx config file.
        • Nginx handles the caching config and backend routing
      • Traefik handles the CSP and CORS settings
      • X-Sendfile is used through Nginx to product download files
    Thread Starter iaudio

    (@iaudio)

    Since disabling the page cache the download links have been working as expected.

    • Browser cache has not been changed.
    • Database caching is not used.
    • Object caching is handled separately and remains unchanged.
    • No Cloudflare changes since my last post.

    I do have a test download URL I can share, but need to better understand the next course of action in terms of how to configure the page cache to avoid this behaviour.

    Thanks again.

    Thread Starter iaudio

    (@iaudio)

    I have purged and disabled the page cache for the time being.

    I am limiting the number of changes to better keep track of the results.

    I will update this thread over the course of the day.

    Thread Starter iaudio

    (@iaudio)

    Hi, thanks for the reply.

    • Page caching uses Disk: Enhanced
    • Cache URIs with query string variables was already disabled.

    I have just changed the following Cloudflare settings:

    • Caching level to ignore query strings, was previously standard
    • Respect headers for Browser TTL, was previously 1 month

    Downloading a file shows its size as (disk cache).

    If I empty the page cache the files download correctly.

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