0% found this document useful (0 votes)
78 views1 page

Cashfree LLD

The document outlines the functional requirements and methods for a cache including writing data with a time-to-live (TTL), reading data through lookups, storing sessions, and deleting keys. It lists put(), get(), and deleteKey() methods and describes internally checking TTL validity and using a least recently used (LRU) eviction policy.

Uploaded by

SS
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views1 page

Cashfree LLD

The document outlines the functional requirements and methods for a cache including writing data with a time-to-live (TTL), reading data through lookups, storing sessions, and deleting keys. It lists put(), get(), and deleteKey() methods and describes internally checking TTL validity and using a least recently used (LRU) eviction policy.

Uploaded by

SS
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Name Ela Bhattacharya

Round 2

Design a Cache

Functional requirements:
save of data (write)
Lookup of data (read)
Storing session
TTL for few hours
deleteKey()

Boolean put(K key, V value, Integer ttl) A-apple, 2hrs


V get(K attributeKey)
Boolean deleteKey(K attributeKey)

// internal
Boolean IsTtlValid(K key,V value, )

// LRU

<Enumeration> CacheEvictionPolicy

You might also like