Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • SkyTheLine 32 posts 102 karma points
    20 days ago
    SkyTheLine
    0

    Media.Cache safe to delete?

    Hi there

    we use a Nginx Server with a CDN for our Media.

    But in our wwwroot i found, that umbraco has "Media.Cache" with tons of files.

    My question is, since Nginx cache everything, does i need it? And is there a way for auto cleanup?

  • AddWeb Solution Pvt. Ltd 76 posts 316 karma points
    1 week ago
    AddWeb Solution Pvt. Ltd
    1

    Hello, Umbraco joins all of the required assets together using the Client Dependency Framework. These are then cached and stored at App_Data\TEMP\ClientDependency.

    You can just delete these to refresh the cache.

    You can stop Umbraco from doing using the CDF by putting your application in debug mode. In your Web.config, find the compilation item and change debug to equal true:

    <compilation defaultLanguage="c#" debug="true" batch="false" targetFramework="4.5">
    

    When Umbraco is set to debug mode false, calls like this will be done which get the cached version of assets: /DependencyHandler.axd?s= When Umbraco is in debug mode, direct calls to your custom assets (and any others that are needed) will be made.

    You will also need to hard refresh your browser like you were doing before or your browser may locally cache the files too.

  • SkyTheLine 32 posts 102 karma points
    1 week ago
    SkyTheLine
    0

    Hi AddWeb

    Thank you for your reply.

    Can i also delete safe everything in App_Data\TEMP?

    I would then write a "Clear Cache" Skript, where the user can purge everything in this folder. Or an auto function which would be run 1x per week.

    Kind regards

Please Sign in or register to post replies

Write your reply to:

Draft