mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Optimizing keys count
This commit is contained in:
@@ -3,6 +3,7 @@ using StackExchange.Redis;
|
||||
|
||||
namespace Orchard.Redis.Extensions {
|
||||
public static class RedisDatabaseExtensions {
|
||||
|
||||
public static void KeyDeleteWithPrefix(this IDatabase database, string prefix) {
|
||||
if (database == null) {
|
||||
throw new ArgumentException("Database cannot be null", "database");
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace Orchard.Redis.OutputCache {
|
||||
}
|
||||
|
||||
public int GetCacheItemsCount() {
|
||||
return GetAllKeys().Count();
|
||||
return Database.KeyCount(GetLocalizedKey("*"));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user