doccaz / scc-tools

A set of simple tools to interact with SUSE Customer Center (SCC)
MIT License
12 stars 1 forks source link

Convert the CacheManager class to use SQLite #28

Open doccaz opened 2 years ago

doccaz commented 2 years ago

Due to the potential amount of small writes with multiple instances, the current cache implementation (plain JSON file) only reads the cache at the startup, modifies it in-memory, then writes it at the end. This is not optimal, and as a collateral effect "only the last one wins". With an SQLite backend, I hope to mitigate this.

Curiously, the current implementation has the thread locking working fine and there have been no data corruptions, but SQLite would also help with that too.