virajjasani commented on PR #5754:
URL: https://github.com/apache/hadoop/pull/5754#issuecomment-1615259963

   > Can we not use some already inbuilt cache rather than us implementing it 
from scratch ( this part is interesting for sure :)) 
https://github.com/google/guava/blob/master/guava/src/com/google/common/cache/LocalCache.java
 guava cache supports maximumSize for eviction and it internally uses LRU. ( 
see the Java docs of the class. )
   
   Interesting,
   
   from the javadoc:
   ```
      * The page replacement algorithm's data structures are kept casually 
consistent with the map. The
      * ordering of writes to a segment is sequentially consistent. An update 
to the map and recording
      * of reads may not be immediately reflected on the algorithm's data 
structures.
   ```
   
   for not-so-heavy loaded cache, perhaps our own implementation might be 
better? given that even reads would have immediate reflection on the doubly 
linked list data structure in our case.
   let me explore a bit more though. thanks for the reference!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to