| 24 | public: |
| 25 | template<typename K> |
| 26 | static BatchCache<K>* Create(CacheStrategy cache_strategy, std::string name) { |
| 27 | switch (cache_strategy) { |
| 28 | case CacheStrategy::LRU: |
| 29 | LOG(INFO) << " Use Storage::LRU in multi-tier EmbeddingVariable " |
| 30 | << name; |
| 31 | return new LRUCache<K>(); |
| 32 | case CacheStrategy::LFU: |
| 33 | LOG(INFO) << " Use Storage::LFU in multi-tier EmbeddingVariable " |
| 34 | << name; |
| 35 | return new LFUCache<K>(); |
| 36 | default: |
| 37 | LOG(INFO) << " Invalid Cache strategy, \ |
| 38 | use LFU in multi-tier EmbeddingVariable " |
| 39 | << name; |
| 40 | return new LFUCache<K>(); |
| 41 | } |
| 42 | } |
| 43 | }; |
| 44 | } // embedding |
| 45 | } // tensorflow |
no outgoing calls
no test coverage detected