Marked CACHE_MIDDLEWARE_ANONYMOUS_ONLY as deprecated

Fixes #15201.