| 480 | // 0 if object is nullptr |
| 481 | template <typename T> |
| 482 | static std::chrono::seconds getConfiguredTtl( |
| 483 | const std::shared_ptr<T>& object) { |
| 484 | if (object == nullptr) { |
| 485 | return std::chrono::seconds{0}; |
| 486 | } |
| 487 | return getReadHandleRefInternal<T>(object)->getConfiguredTTL(); |
| 488 | } |
| 489 | |
| 490 | // Get the last access timestamp of the object |
| 491 | // @param object object shared pointer returned from ObjectCache APIs |