When a cache instance is created, it initially sets the cache identifiers.
It is then possible to change the identifiers by using $cache->set_identifiers() function. This changes part of the cache instance to point to a different set of keys in the cache than it did before. However the cache instance is still considered the same. This means that it's impossible to cache a cache::make() result as it is not guaranteed to point to the same cache information that was set when cache::make() was called.
The first example of this is in the databasemeta cache. It requires the dbfamily and settings to be set on each call. If you do the following, the actual result is probably not what's expected.
This behaviour change proposes the following things;
1. the set_identifiers() definition function will be made unavailable and only used in a cache constructor.
2. The definition instance cache will now consider identifiers to be part of the same cache. So identifiers are considered completely different cache instances rather than the possibility of changing where a cache points to.
3. All keys that are generated as part of the cache creation can be then cached in the correct location, reducing cache storage overhead. These are singlekeyprefix and multikeyprefix. They are used to split stores into different parts when multiple caches operate on them.
The databasemeta cache will also be updated to use the ability to store a cache pointer inside the class for faster database lookups without calling cache::make on each call to get_columns.
This change also allows for more broad caching of cache::make() with the assurance you will get the answers you will expect. This can save quite some time parsing any identifiers and returning the correct cache definition to the function.