Skip to content

Commit

Permalink
Remove option for vault caching
Browse files Browse the repository at this point in the history
  • Loading branch information
ShimmyMySherbet committed Dec 4, 2022
1 parent f4c1ddb commit 3379938
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
1 change: 0 additions & 1 deletion SherbetVaults/Models/Config/SherbetVaultsConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ namespace SherbetVaults.Models.Config
public class SherbetVaultsConfig : IRocketPluginConfiguration
{
public DatabaseSettings DatabaseSettings;
public bool CacheVaults = false;
public bool LargestVaultIsDefault = false;
public string DefaultVault = "default";
public bool VaultAliasesEnabled = false;
Expand Down
14 changes: 0 additions & 14 deletions SherbetVaults/Models/VaultManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ public class VaultManager
public SherbetVaultsPlugin VaultsPlugin { get; }
public VaultCache VaultsCache { get; }
public DatabaseManager Database => VaultsPlugin.Database;
public bool EnableCache => VaultsPlugin.Config.CacheVaults;

public VaultManager(SherbetVaultsPlugin vaultsPlugin)
{
Expand All @@ -20,15 +19,6 @@ public VaultManager(SherbetVaultsPlugin vaultsPlugin)

public async Task<VaultItems> GetVault(ulong playerID, string vaultID, bool allowCache = true)
{
//if (EnableCache && allowCache)
//{
// var cached = VaultsCache.GetStorage(playerID, vaultID);
// if (cached != null)
// {
// return cached;
// }
//}

var vaultConfig = VaultsPlugin.VaultSelector.GetVaultConfig(vaultID);

if (vaultConfig == null)
Expand All @@ -38,10 +28,6 @@ public async Task<VaultItems> GetVault(ulong playerID, string vaultID, bool allo

var items = await Database.VaultItems.OpenVault(playerID, vaultID, vaultConfig);

if (EnableCache)
{
VaultsCache.SetStorage(playerID, vaultID, items);
}
return items;
}

Expand Down

0 comments on commit 3379938

Please sign in to comment.