remote-index-cached-as-rows-with-validator

Installation
SKILL.md

A remote index, stored as rows, revalidated by ETag

Some catalogues are published as one big static file — hundreds of kilobytes, thousands of entries, updated occasionally. Three separate decisions make this cheap:

  1. Rows, not a blob. Parse once into a table so a search is an indexed query, not a re-parse.
  2. A time-to-live before you even ask whether the file changed.
  3. The server's own validator for the ask itself, so "unchanged" costs headers only.
suspend fun refreshIndex(force: Boolean): Boolean {
    val meta = local.indexMeta()
    val cached = local.entryCount()
    val now = Clock.System.now().toEpochMilliseconds()
    if (!force && meta != null && cached > 0 && now - meta.fetchedAt < INDEX_TTL_MS) return false
Installs
2
GitHub Stars
35
First Seen
5 days ago
remote-index-cached-as-rows-with-validator — maxrave-dev/kotlin-footguns