Update SDK to automatically pull runtime URL when a session starts#28
Update SDK to automatically pull runtime URL when a session starts#28bharatsuri97 wants to merge 1 commit intomasterfrom
Conversation
| return Optional.ofNullable(val); | ||
| } | ||
|
|
||
| public Optional<Object> getObject(String key) { |
There was a problem hiding this comment.
What would help here is to turn the Cache into a generic Cache<T>. That would let you avoid using the concrete type in BaseChatbotClientImpl and creating the set/getObject methods.
There was a problem hiding this comment.
Agree, we can make to use generic type.
| this.basePath = basePath; | ||
| this.webClientBuilder = webClientBuilder; | ||
| this.clientWrapper = ClientFactory.createClient(basePath, webClientBuilder); | ||
| this.cache = new InMemoryCache(DEFAULT_TTL_SECONDS); |
There was a problem hiding this comment.
See note about making Cache generic here, then you can just have a protected Cache<Object> cache and handle the casting on a per-key basis (or create a POJO to store if you want to avoid casing between String|Object)
There was a problem hiding this comment.
Don't think we want to hardcode to InMemoryCache , it's better allow user to provide cache implementation.
| return Optional.ofNullable(val); | ||
| } | ||
|
|
||
| public Optional<Object> getObject(String key) { |
There was a problem hiding this comment.
Agree, we can make to use generic type.
|
|
||
| private JedisPool jedisPool; | ||
| private long ttlSeconds; | ||
| private final long ttlSeconds; |
There was a problem hiding this comment.
I think we should also support storing/retrieving objects in RedisCache implementation.
| this.basePath = basePath; | ||
| this.webClientBuilder = webClientBuilder; | ||
| this.clientWrapper = ClientFactory.createClient(basePath, webClientBuilder); | ||
| this.cache = new InMemoryCache(DEFAULT_TTL_SECONDS); |
There was a problem hiding this comment.
Don't think we want to hardcode to InMemoryCache , it's better allow user to provide cache implementation.
5091e11 to
94017a6
Compare
9f027e2 to
4ee9ac9
Compare
4ee9ac9 to
b8a9c37
Compare
No description provided.