Conversation
7914dd7 to
5d867bf
Compare
|
|
||
| // clang-format off | ||
|
|
||
| /// @page Caching Component for Ydb |
There was a problem hiding this comment.
Please move the extended documentation to scripts/docs/*/ydb_cache.md
Huge pages in C++ code are considered harmful for new code
| /// | ||
| /// @see @ref ydb_cache, @ref scripts/docs/en/userver/caches.md | ||
| template <typename YdbCachePolicy> | ||
| class YdbCache final |
There was a problem hiding this comment.
components::YdbCache -> ydb::CacheComponent
We don't use components:: namespace for new code, and duplicating "ydb" twice is also not the best naming
| ydb_cache::detail::kDefaultChunkSize)} { | ||
| /* TODO | ||
| UINVARIANT( | ||
| !chunk_size_ || storages::ydb::Portal::IsSupportedByDriver(), |
There was a problem hiding this comment.
A reminder to clean all the commented code
| config.Name() + "' cache"); | ||
| } | ||
|
|
||
| const auto ydb_alias = config["ydbcomponent"].As<std::string>(""); |
There was a problem hiding this comment.
There is only 1 ydb component, but it has multiple databases
|
|
||
| // clang-format off | ||
|
|
||
| /// @page Caching Component for Ydb |
There was a problem hiding this comment.
Add the new documentation page to index.md as a sublist item to main YDB page
| /// ---------- | ||
| /// | ||
| /// @htmlonly <div class="bottom-nav"> @endhtmlonly | ||
| /// ⇦ @ref scripts/docs/en/userver/cache_dumps.md | @ref scripts/docs/en/userver/lru_cache.md ⇨ |
There was a problem hiding this comment.
Fix according to the position in index.md relative to other pages.
Also fix the footers in the neighbouring pages to point to the new ydb cache page
There was a problem hiding this comment.
Please add a functional test. It shouldn't use any fancy features. Have a small, but realistic table. Add a handler that returns data from the cache. Check that the cache works. Check that the cache can get stale relatively to the data in the table, then call await service_client.invalidate_caches(cache_names=...) to update the cache and verify it
The test will also serve as a proof-of-concept that you've really got a working YDB cache. test/cache.cpp does not provide that guarantee
adding ydb cache policy