diff --git a/Module/EntityCache/EntityCache.cs b/EntityCache/Module.cs
similarity index 85%
rename from Module/EntityCache/EntityCache.cs
rename to EntityCache/Module.cs
index 352d436..d2cb8dd 100644
--- a/Module/EntityCache/EntityCache.cs
+++ b/EntityCache/Module.cs
@@ -7,37 +7,26 @@ using System;
using System.Collections.Generic;
using System.Threading.Tasks;
-namespace Noikoio.RegexBot.Module.EntityCache
+namespace Noikoio.RegexBot.EntityCache
{
///
- /// Caches information regarding all known guilds, channels, and users.
+ /// Bot module portion of the entity cache. Caches information regarding all known guilds, channels, and users.
/// The function of this module should be transparent to the user, and thus no configuration is needed.
/// This module should be initialized BEFORE any other modules that make use of guild and user cache.
///
- class EntityCache : BotModule
+ class Module : BotModule
{
- /*
- * Future plans:
- * Have this, or something connected to this class, be accessible throughout the bot.
- *
- * There should be a system that holds a small in-memory cache of users (as EntityCache objects)
- * for quick lookups by other parts of the bot.
- * Without this system, we'll be having future bot features constantly querying the database
- * on their own to look up entity cache records, which (among other things) could result in
- * a race conditions where an event becomes aware of a user before it has been recorded.
- */
-
private readonly DatabaseConfig _db;
public override string Name => nameof(EntityCache);
-
- public EntityCache(DiscordSocketClient client) : base(client)
+
+ public Module(DiscordSocketClient client) : base(client)
{
_db = RegexBot.Config.Database;
if (_db.Available)
{
- Sql.CreateCacheTables();
+ SqlHelper.CreateCacheTables();
client.GuildAvailable += Client_GuildAvailable;
client.GuildUpdated += Client_GuildUpdated;
@@ -49,12 +38,12 @@ namespace Noikoio.RegexBot.Module.EntityCache
Log("No database storage available.").Wait();
}
}
-
+
public override Task