A computing element for managing a compressed cache, the computing element characterized as comprising: a first hardware engine configured to: upon receiving a size of data to be stored to the compressed cache, allocate a first number of virtual memory pages sufficient to store the data; and allocate a first number of physical memory pages of the cache to fill the first number of virtual memory pages; a second hardware engine configured to: compress the data; responsive to the data being compressed, to store the compressed data into a second number of physical memory pages, and responsive to the data not being compressed, to store the uncompressed data into the first number of physical memory pages, wherein the first hardware engine is further configured to deallocate one or more physical memory pages of the first number of physical memory pages not used to store the compressed data, wherein the first number of virtual memory pages are allocated from a pool of available virtual memory pages, wherein the first number of physical memory pages are allocated from a pool of available physical memory pages, wherein the first hardware engine is further configured to maintain the pool of available physical memory pages and to maintain the pool of available virtual memory pages, wherein maintaining the pool of available virtual memory pages and maintaining the pool of available physical memory pages comprises maintaining a head pointer (331, 341) and a tail pointer (332, 342) for each pool, wherein each of the allocated physical memory pages comprises a respective header, and wherein the second hardware engine is further configured to write a predetermined value at a predetermined location in each header to indicate whether data stored in the respective physical memory page is compressed, the computing element being further characterized in that each of the virtual memory pages and physical memory pages corresponds to a respective index stored in the memory cache, and wherein each index is of a fixed size and comprises a predetermined number of leading bits that indicate a size of the corresponding page, and whether the page comprises virtual memory or physical memory. upon receiving a size of data to be stored to the compressed cache, allocate a first number of virtual memory pages sufficient to store the data; and allocate a first number of physical memory pages of the cache to fill the first number of virtual memory pages; a second hardware engine configured to: compress the data; responsive to the data being compressed, to store the compressed data into a second number of physical memory pages, and responsive to the data not being compressed, to store the uncompressed data into the first number of physical memory pages, wherein the first hardware engine is further configured to deallocate one or more physical memory pages of the first number of physical memory pages not used to store the compressed data, wherein the first number of virtual memory pages are allocated from a pool of available virtual memory pages, wherein the first number of physical memory pages are allocated from a pool of available physical memory pages, wherein the first hardware engine is further configured to maintain the pool of available physical memory pages and to maintain the pool of available virtual memory pages, wherein maintaining the pool of available virtual memory pages and maintaining the pool of available physical memory pages comprises maintaining a head pointer (331, 341) and a tail pointer (332, 342) for each pool, wherein each of the allocated physical memory pages comprises a respective header, and wherein the second hardware engine is further configured to write a predetermined value at a predetermined location in each header to indicate whether data stored in the respective physical memory page is compressed, the computing element being further characterized in that each of the virtual memory pages and physical memory pages corresponds to a respective index stored in the memory cache, and wherein each index is of a fixed size and comprises a predetermined number of leading bits that indicate a size of the corresponding page, and whether the page comprises virtual memory or physical memory.