Updated code in sync with caching enum change.