Skip to content

Commit

Permalink
updated building of cache and updated config in package
Browse files Browse the repository at this point in the history
  • Loading branch information
iamandycohen committed Oct 19, 2015
1 parent 949d7a0 commit d271005
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 54 deletions.
18 changes: 16 additions & 2 deletions Hi.UrlRewrite/Caching/RulesCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@ public RulesCache(Database db) :

public List<InboundRule> GetInboundRules()
{
return (GetObject(inboundRulesKey) as IEnumerable<InboundRule>).ToList();
List<InboundRule> returnRules = null;
var rules = GetObject(inboundRulesKey) as IEnumerable<InboundRule>;
if (rules != null)
{
returnRules = rules.ToList();
}

return returnRules;
}

public void SetInboundRules(IEnumerable<InboundRule> inboundRules)
Expand All @@ -42,7 +49,14 @@ public void SetInboundRules(IEnumerable<InboundRule> inboundRules)

public List<OutboundRule> GetOutboundRules()
{
return (GetObject(outboundRulesKey) as IEnumerable<OutboundRule>).ToList();
List<OutboundRule> returnRules = null;
var rules = GetObject(inboundRulesKey) as IEnumerable<OutboundRule>;
if (rules != null)
{
returnRules = rules.ToList();
}

return returnRules;
}

public void SetOutboundRules(IEnumerable<OutboundRule> outboundRules)
Expand Down
4 changes: 2 additions & 2 deletions Hi.UrlRewrite/Fields/SiteDropList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ protected override bool LoadPostData(string value)
return false;
}

Sitecore.Diagnostics.Log.Info(this + " : Field : " + GetViewStateString("Field"), this);
Sitecore.Diagnostics.Log.Info(this + " : FieldName : " + GetViewStateString("FieldName"), this);
Sitecore.Diagnostics.Log.Debug(this + " : Field : " + GetViewStateString("Field"), this);
Sitecore.Diagnostics.Log.Debug(this + " : FieldName : " + GetViewStateString("FieldName"), this);

if (GetViewStateString("Value") != value)
{
Expand Down
1 change: 0 additions & 1 deletion Hi.UrlRewrite/Hi.UrlRewrite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@
<Compile Include="LogHelper.cs" />
<Compile Include="Module\OutboundModule.cs" />
<Compile Include="Module\ResponseFilterStream.cs" />
<Compile Include="MyFilter.cs" />
<Compile Include="Processing\InboundRuleInitializer.cs" />
<Compile Include="Processing\InboundRulesHelper.cs" />
<Compile Include="Processing\OutboundRewriteProcessor.cs" />
Expand Down
49 changes: 0 additions & 49 deletions Hi.UrlRewrite/MyFilter.cs

This file was deleted.

0 comments on commit d271005

Please sign in to comment.