internal void OnItemRenamed(object sender, EventArgs args)
        {
            Assert.ArgumentNotNull(sender, "sender");
            Assert.ArgumentNotNull(args, "args");

            var sitecoreArgs = args as SitecoreEventArgs;

            if (sitecoreArgs == null)
            {
                return;
            }

            var arguments = new ItemRenamedEventArgs((Item)sitecoreArgs.Parameters[0], (string)sitecoreArgs.Parameters[1]);

            if (arguments.Item == null)
            {
                return;
            }

            try
            {
                //Reset Caches
                ResetDynamicSitesCache(arguments.Item);
            }
            catch (NullReferenceException)
            {
                //Do nothing.
            }
            catch (Exception e)
            {
                Log.Error(String.Format("[DynamicSites] Error: {0} \r\n Stack: {1}", e.Message, e.StackTrace), e);
            }
        }
        internal void OnItemRenamed(object sender, EventArgs args)
        {
            Assert.ArgumentNotNull(sender, "sender");
            Assert.ArgumentNotNull(args, "args");

            var sitecoreArgs = args as SitecoreEventArgs;
            if (sitecoreArgs == null) return;

            var arguments = new ItemRenamedEventArgs((Item)sitecoreArgs.Parameters[0], (string) sitecoreArgs.Parameters[1]);

            if (arguments.Item == null) return;

            try
            {
                //Reset Caches
                ResetDynamicSitesCache(arguments.Item);
            }
            catch (NullReferenceException)
            {
                //Do nothing. 
            }
            catch (Exception e)
            {
                Log.Error(String.Format("[DynamicSites] Error: {0} \r\n Stack: {1}", e.Message, e.StackTrace), e);
            }
        }