Return a curried object with metadata from $profile_name or as explicitly specified.

If a profile by the name $profile_name doesn't exist, but a backend object by that name does exist, the backend will be returned instead, since the interface for curried caches and backends is almost identical.

This method can also be called without arguments, in which case is treated as though the %meta hash was empty.

Whenever you set or retrieve a key you may specify additional metadata that will be used to select a specific backend.

This metadata is very freeform, and the only key that has any meaning by default is the backend key which can be used to explicitly choose a backend by name.

The choose_cache_backend method can be overridden in order to facilitate more intelligent backend selection. For example, Catalyst::Plugin::Cache::Choose::KeyRegexes overrides that method to select a backend based on key regexes.

In order to avoid specifying %meta over and over again you may call cache or curry_cache with %meta once, and get back a curried cache object. This object responds to the methods get, set, and remove, by appending its captured metadata and delegating them to cache_get, cache_set, and cache_remove.