SpiceBot-migrated/sopel_modules/SpiceBot_Database_Cache/DatabaseCache.py

19 lines
528 B
Python

#!/usr/bin/env python
# coding=utf-8
from __future__ import unicode_literals, absolute_import, print_function, division
# sopel imports
import sopel.module
from sopel_modules.SpiceBot_SBTools import bot_logging
def setup(bot):
bot_logging(bot, 'SpiceBot_DatabaseCache', "Setting up Database Cache")
if 'SpiceBot_DatabaseCache' not in bot.memory:
bot.memory['SpiceBot_DatabaseCache'] = dict()
def shutdown(bot):
if "SpiceBot_DatabaseCache" in bot.memory:
del bot.memory["SpiceBot_DatabaseCache"]