bumptech / bumptech/glide

Proposal: Expirable LRU Disk Cache

Open
#3,418 7 comments 7 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
35k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
8

Description

**Glide Version**: 4.8.0

With upcoming [GDPR](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation) it would be nice to have some disk cache expiration policy. E.g. I want to cache image for 30 days.

This can be achieved by modifying `DiskLruCacheWrapper#get` method.

```java
@Override
public File get(Key key) {
// ...
if(expired) {
result = null;
delete(key);
}
// ...
}
```

If you think this may be useful I can send PR.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.