Skip to content

Expiration is not automatic? #55

@rogerhival

Description

@rogerhival

Hi, I've been trying to understand how to work with your library in one of my projects.
I'm using Hash as default cache manager.

So I've been setting the AbsoluteExpiration to 24h. And the cache is injected in a server with a single instance (new FileCache is called only once) that "does not sleep". (we deploy once a week).
The problem I'm facing is that the files in the Cache folder don't get deleted unless we deploy the server. As I could see in the code, the "clean cache" is only called in the constructor. Is that the expected behavior? Is having a single "new FileCache" the correct way to use the cache for multiple requests or should we do something else?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions