Not only this, but also org.hibernate.cache.Cache.CacheProvider is also deprecated.
If this is how we should create our own custom caching solutions? Alternative method?
JavaDoc explains this:
The deprecated (and now deprecated) approach to caching is determined by the CacheProvider and Cache interfaces, as well as the CacheConcurrencyStrategy interface along with various implementations of all these interfaces. In this scheme, CacheProvider defines how to configure and perform life-cycle operations for a specific base cache library; he also defined how to create Cache instances, which in turn determine how to access the "regions" of the underlying cache instance. For entity data cache areas and collections, CacheConcurrencyStrategy terminates access to these cache areas for applying transaction / concurrent semantics.The improved approach is based on RegionFactory, various specializations of the region, and two access strategy contracts (EntityRegionAccessStrategy and CollectionRegionAccessStrategy).
The deprecated (and now deprecated) approach to caching is determined by the CacheProvider and Cache interfaces, as well as the CacheConcurrencyStrategy interface along with various implementations of all these interfaces. In this scheme, CacheProvider defines how to configure and perform life-cycle operations for a specific base cache library; he also defined how to create Cache instances, which in turn determine how to access the "regions" of the underlying cache instance. For entity data cache areas and collections, CacheConcurrencyStrategy terminates access to these cache areas for applying transaction / concurrent semantics.
The improved approach is based on RegionFactory, various specializations of the region, and two access strategy contracts (EntityRegionAccessStrategy and CollectionRegionAccessStrategy).
To summarize, there is a new improved API that you should use.