Logo Knowledge
  • Product Documentation
  • Insight
  • Developer Center
  • Training
  • Submit a Request
  • Product Documentation
  • Insight
  • Developer Center
  • Training
  • Submit a Request
  1. Acquia Support Knowledge Base
  2. Troubleshooting
  3. Common Problem

Deleted files remaining in cache

    See more
    • Updated
    • December 22, 2020 00:58

    Issue

    When a file is deleted from the Drupal site it is still accessible until Varnish cache is cleared.

    Resolution

    You can implement a reduced cache duration for specific files, however any local browser cached copies of the file will remain there for up to two weeks and it will only be new requests to the specific files that will respect this change (once implemented).

    Creating a custom caching policy:

    • Creating custom caching policy per file type
    • Set max-age headers for specific pages, files, or paths

    Acquia recommends that you thoroughly test any changes to reducing cache as this could increase the load on your servers and impact site performance.

    Cause

    File cache time is set independently of your website's cache duration. The cache time on files is set in the .htaccess file, and the default is two weeks:

    # Cache all files for 2 weeks after access (A).
    ExpiresDefault A1209600

    This means you could have to wait up to two weeks for your file to be deleted in the browser, as the file will be cached in the users' local browser caches and Varnish cache for up to two weeks. Note: these files can still be stored in local browser caches despite clearing Drupal and/or Varnish cache.

    Acquia Products

    • Not Applicable

    Topics

    • cache

    In this Series

    • Cache time on updated files
    Avatar
    Mikaela McGrath
    • December 22, 2020 00:58
    • Updated
    • Facebook
    • Twitter
    • LinkedIn

    Was this article helpful?
    1 out of 1 found this helpful

    Return to top

    Related articles

    • Set max-age headers for specific pages, files, or paths
    • Acquia Holidays 2021
    • Cache time on updated files
    • Clearing PHP Apcu cache on Acquia Cloud
    • Acquia DAM 502 error message

    Support

    Acquia Support Knowledge Base
    • Submit a Request
    • Contact Support
    • Acquia Support Guide
    • Product Documentation
    • System Status

    About Acquia

    • About Us
    • Leadership
    • Board of directors
    • Newsroom
    • Careers
    • Customers
    • Contact Us
    53 State Street, 10th Floor
    Boston, MA 02109
    United States
    Phone: 888-922-7842
    Map: Google Maps
    View other locations
    • Feeds
    • Legal
    • Security Issue?

    Copyright © 2018 Acquia Inc. All Rights Reserved. Drupal is a registered trademark of Dries Buytaert.