Skip to content

Commit 2b922f6

Browse files
author
claudiamurialdo
committed
Add local memory cache to Redis implementation to reduce roundtrips
1 parent 1116b1c commit 2b922f6

File tree

4 files changed

+438
-7
lines changed

4 files changed

+438
-7
lines changed

dotnet/src/dotnetcore/GxClasses/Services/Session/GXSessionFactory.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ public class GXSessionServiceFactory
1919
private static readonly IGXLogger log = GXLoggerFactory.GetLogger<GXSessionServiceFactory>();
2020

2121
static ISessionService sessionService;
22-
static string REDIS = "REDIS";
23-
static string DATABASE = "DATABASE";
2422
public static ISessionService GetProvider()
2523
{
2624
if (sessionService != null)
@@ -35,9 +33,9 @@ public static ISessionService GetProvider()
3533
//Compatibility
3634
if (string.IsNullOrEmpty(className))
3735
{
38-
if (providerService.Name.Equals(REDIS, StringComparison.OrdinalIgnoreCase))
36+
if (providerService.Name.Equals(GXServices.REDIS_CACHE_SERVICE, StringComparison.OrdinalIgnoreCase))
3937
type = typeof(GxRedisSession);
40-
else if (providerService.Name.Equals(DATABASE, StringComparison.OrdinalIgnoreCase))
38+
else if (providerService.Name.Equals(GXServices.DATABASE_CACHE_SERVICE, StringComparison.OrdinalIgnoreCase))
4139
type = typeof(GxDatabaseSession);
4240
}
4341
else

0 commit comments

Comments
 (0)