krpeacock / certified-cache

Motoko CertifiedCache library for storing dynamic certified http responses
https://fni6r-gaaaa-aaaab-qah7a-cai.ic0.app/
8 stars 2 forks source link

Having stable memory & using BTree to store files #1

Open infu opened 1 year ago

infu commented 1 year ago

I wanted to use BTree and also not use pre post_upgrades, so I've removed a lot of the code and kept the essentials. BTrees are going to do a better job here imo, because you can search for files with a prefix and easily find them all. HashMaps can't provide that and scale. https://github.com/infu/certified-http/blob/main/src/lib.mo#L15

krpeacock commented 3 months ago

valid! I'm going to do a re-write soon and incorporate some of your choices while preserving the cache