module Ollama::Documents::Cache::Common

def collections(prefix)

def collections(prefix)
  unique = Set.new
  full_each { |key, _| unique << key[/\A#{prefix}(.*)-/, 1] }
  unique.map(&:to_sym)
end

def pre(key)

def pre(key)
  [ @prefix, key ].join
end

def unpre(key)

def unpre(key)
  key.sub(/\A#@prefix/, '')
end