Skip to content

Commit a8024b2

Browse files
committed
Reverted EfCache
1 parent e2ac435 commit a8024b2

14 files changed

Lines changed: 53 additions & 546 deletions

File tree

src/Libraries/SmartStore.Core/IO/VirtualPath/VirtualFolder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public virtual void CopyFile(string relativePath, Stream destination)
191191

192192
public string GetVirtualPath(string relativePath)
193193
{
194-
Guard.NotEmpty(relativePath, nameof(relativePath));
194+
Guard.NotNull(relativePath, nameof(relativePath));
195195

196196
if (relativePath.StartsWith("~/"))
197197
{

src/Libraries/SmartStore.Core/Logging/log4net/Log4netLogger.cs

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,23 @@ public void Log(LogLevel level, Exception exception, string message, object[] ar
7474

7575
protected internal void TryAddExtendedThreadInfo(LoggingEvent loggingEvent)
7676
{
77+
HttpRequest httpRequest = null;
78+
79+
try
80+
{
81+
httpRequest = HttpContext.Current.Request;
82+
}
83+
catch
84+
{
85+
loggingEvent.Properties["CustomerId"] = DBNull.Value;
86+
loggingEvent.Properties["Url"] = DBNull.Value;
87+
loggingEvent.Properties["Referrer"] = DBNull.Value;
88+
loggingEvent.Properties["HttpMethod"] = DBNull.Value;
89+
loggingEvent.Properties["Ip"] = DBNull.Value;
90+
91+
return;
92+
}
93+
7794
var props = _state.GetState();
7895

7996
// Load the log4net thread with additional properties if they are available
@@ -104,16 +121,15 @@ protected internal void TryAddExtendedThreadInfo(LoggingEvent loggingEvent)
104121

105122

106123
IWebHelper webHelper;
107-
HttpContextBase httpContext;
108124

109125
// Url & stuff
110-
if (container.TryResolve<IWebHelper>(null, out webHelper) && container.TryResolve<HttpContextBase>(null, out httpContext))
126+
if (container.TryResolve<IWebHelper>(null, out webHelper))
111127
{
112128
try
113129
{
114130
props["Url"] = webHelper.GetThisPageUrl(true);
115131
props["Referrer"] = webHelper.GetUrlReferrer();
116-
props["HttpMethod"] = httpContext.Request.HttpMethod;
132+
props["HttpMethod"] = httpRequest?.HttpMethod;
117133
props["Ip"] = webHelper.GetCurrentIpAddress();
118134
}
119135
catch { }

src/Libraries/SmartStore.Data/Caching/CacheInvalidationInterceptor.cs

Lines changed: 0 additions & 47 deletions
This file was deleted.

src/Libraries/SmartStore.Data/Caching/QueryCache.cs

Lines changed: 0 additions & 215 deletions
This file was deleted.

0 commit comments

Comments
 (0)