# What changed in flask-caching

> 36 changes in flask-caching 2 from its official release notes, upgrade guides and advisories: 9 breaking, 14 new APIs and options. Each one cited. Sources checked 2026-10-25. HTML: https://unstale.sh/pypi/flask-caching/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## flask-caching 2

### Breaking changes

- View arguments named path or query_args are no longer treated as explicit make_cache_key() arguments of the same name. (2.5.1) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.1)
- The Jinja tag no longer propagates backend errors; if the cache is unavailable, it renders the block normally. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- The default hash method changes from hashlib.md5 to hashlib.sha256, making earlier cache entries obsolete; configure hashlib.md5 to retain the old method. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- Removes support for the deprecated lowercase backend names null, simple, filesystem, redis, redissentinel, rediscluster, uwsgi, memcached, gaememcached, saslmemcached, and spreadsaslmemcached. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- Caches an HTTPException raised by the view and re-raises it on a cache hit; use response_filter to keep the exception out of the cache. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- The minimum required cachelib version is 0.17.0. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- Uses cachelib's delete_many behavior: nonexistent keys count as deleted, and with CACHE_IGNORE_ERRORS=False a RuntimeError is raised if a key could not be deleted. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- forced_update callbacks are called once per decorated function call rather than during key creation and again before cache lookup. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- Support for Python 3.10 is dropped. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)

### New APIs and options

- Adds a FileSystemCache configuration option to select a different hash function for cache keys. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- Adds a configuration option to set the hash method used for cache keys created by @cached and @memoize. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- Adds a configuration option to set the cachelib serializer used by the backend. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- Signals are sent for cache hits and misses. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- Cachelib backends can now be configured directly using a cachelib class path, such as cachelib.ValkeyCache. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- Adds Cache.delete_cached() to support deleting views decorated with cached(query_string=True). (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- Adds an is_stale option called on a cache hit with the cached value to determine whether the cache is stale; it can be combined with forced_update. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- Timeouts can now be specified with datetime.timedelta. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- Adds the path argument to support deleting views decorated with cached(query_string=True). (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- Adds the query_args argument to support deleting views decorated with cached(query_string=True). (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- Adds pool_blocking to make MemcachedCache backends thread-safe. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- Adds pool_size to make MemcachedCache backends thread-safe. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- Adds an is_stale option called on a cache hit with the cached value to determine whether the cache is stale; it can be combined with forced_update. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- Forwards kwargs to RedisCluster.from_url, allowing callers to pass arguments through. (2.4.1) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.4.1)

### Behavior and default changes

- CACHE_IGNORE_ERRORS now applies to every backend instead of only SimpleCache and FileSystemCache. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- SimpleCache is now thread-safe, using an RLock for all operations. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)

### Tooling

- Preserves the wrapped function's signature and exposes uncached, cache_timeout, and make_cache_key to type checkers. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- Preserves the wrapped function's signature and exposes uncached, cache_timeout, make_cache_key, and delete_memoized to type checkers. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)

### Fixes and other changes

- For a bound method, delete_memoized now takes the instance from the method, so passing obj.method and arguments deletes that method's cache. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- Includes key_prefix when building query-string cache keys. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- Stops response_hit_indication=True from appending a new after_request function to the app on every request. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- Fixes __caching_id__ so it can be used; @memoize no longer silently ignores it and runs the function uncached. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- Fixes views returning iterators of strings so rendered templates are not returned as a list of JSON strings. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- Fixes cache-key collisions between a falsy parameter default and None, which could return the wrong cached result. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- Refreshes the memoize version key's timeout whenever an entry is written, using that entry's own timeout, to avoid invalidating the function's entire cache. (2.5.0) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.5.0)
- Fixes the CachedResponse.__init__ typing for mypy --strict. (2.4.1) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.4.1)
- Fixes memoize and cached TYPE_CHECKING annotations under Python 3.14. (2.4.1) — [release notes](https://github.com/pallets-eco/flask-caching/releases/tag/v2.4.1)
