Database updating when updating cache

hello, right now im trying to cache the replit database, so that it will be faster to add data to the database with a clone of it at the same time. im using and storing the database in bot.db_cache bot variable by doing bot.db_cache = copy.deepcopy(db), but when i edit the bot.db_cache, the database still gets edited which i dont want, how can i prevent this?

Can you please provide a link to the repl? Also, when using and replit db, remember to use async db instead of normal db :slight_smile: