Requirements
The buffer is the center of the memory caching. It has FIFO eviction policy that has to be activated when the total memory size of all objects in the buffer is above the buffer maximum size. Furthermore, it needs to enable the indexing of elements into the indexing structure and perform the calculations that will return the size of all objects in the buffer. It is important that buffer is correctly synchronized and thread-safe, because it is an intention that many threads work on the buffer.