XVMX / vmbot

Jabberbot based chatbot
GNU General Public License v3.0
2 stars 5 forks source link

Cache Versioning #16

Closed TheJokr closed 9 years ago

TheJokr commented 9 years ago

Clearing the cache during a reboot may not be the best idea

(21:16:47) jack_haydn: joker_gates: why clear the cache upon reboot? (21:16:51) jack_haydn: it's most likely still valid (21:16:59) jack_haydn: and if it's outdated, it'll pull new anyway (21:17:11) joker_gates: well, if you change cache structure or something (21:18:20) jack_haydn: add a versioning table to your cache! (21:20:49) jack_haydn: have a table with 1 column "version", have a variable in the bot with the same version string. upon initializing the cache(setCache from what i've seen so far), compare them, if mismatch, nuke it, create new (21:21:22) jack_haydn: if you change the structure in the bot, increment version variable