A system for providing distributed caching in a transactional processing environment, the system comprising: a computer that includes one or more microprocessors; a transactional processing environment , executing on the computer, which includes a plurality of layers that provide a caching functionality, including a buffer-based distributed caching, BDC, layer configured to expose an application programming interface, API, for use by caching clients to interact with the system for providing distributed caching, and to receive a caching request via the API, wherein the caching request is associated with a particular buffer type, the BDC layer being further configured to register a plurality of buffer types as data types that can be cached and one or more callback functions for each buffer type an implementation layer configured to include a plurality of implementations of caching operations, each implementation by a different caching provider, and a common distributed caching, CDC, layer configured to define common caching-related interfaces to access caching operations from a particular caching provider, the CDC layer is configured to support a common data structure; and wherein the CDC layer , when receiving a caching request transferred from the BDC layer, is configured to invoke the callback functions of the BDC layer to convert between the particular buffer type associated with the caching request and the common data structure, and to load from the implementation layer the implementation of caching operations by the particular caching provider, to perform caching operations on data associated with the caching request. a computer that includes one or more microprocessors; a transactional processing environment , executing on the computer, which includes a plurality of layers that provide a caching functionality, including a buffer-based distributed caching, BDC, layer configured to expose an application programming interface, API, for use by caching clients to interact with the system for providing distributed caching, and to receive a caching request via the API, wherein the caching request is associated with a particular buffer type, the BDC layer being further configured to register a plurality of buffer types as data types that can be cached and one or more callback functions for each buffer type an implementation layer configured to include a plurality of implementations of caching operations, each implementation by a different caching provider, and a common distributed caching, CDC, layer configured to define common caching-related interfaces to access caching operations from a particular caching provider, the CDC layer is configured to support a common data structure; and an implementation layer configured to include a plurality of implementations of caching operations, each implementation by a different caching provider, and a common distributed caching, CDC, layer configured to define common caching-related interfaces to access caching operations from a particular caching provider, the CDC layer is configured to support a common data structure; and wherein the CDC layer , when receiving a caching request transferred from the BDC layer, is configured to invoke the callback functions of the BDC layer to convert between the particular buffer type associated with the caching request and the common data structure, and to load from the implementation layer the implementation of caching operations by the particular caching provider, to perform caching operations on data associated with the caching request. <EOS>