Try our conversational search powered by Generative AI!

Class NoHitUrlHandler

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Implementation of no-hit caching

Inheritance
System.Object
NoHitUrlHandler
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Web.Internal
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7
Syntax
public class NoHitUrlHandler : CachedUrlHandler, IHandleUrlForRewrite
Remarks

Put at the very end of URL handlers to cache requests for non-existing URL:s. These URL:s will otherwise be the most expensive to process since every handler must check its namespace to verify non-existence.

Constructors

NoHitUrlHandler()

Declaration
public NoHitUrlHandler()

Properties

UrlRewritten

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets a value indicating whether the URL was rewritten as a result of the TryHandleUrl method.

Declaration
public bool UrlRewritten { get; }
Property Value
Type Description
System.Boolean

Will always return false, since non-existing URL:s should not be rewritten.

Methods

RewriteFromCachedData(UrlRewriteContext, ref Object)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Rewrites the URL from cached data.

Declaration
public override bool RewriteFromCachedData(UrlRewriteContext context, ref object internalObject)
Parameters
Type Name Description
UrlRewriteContext context

The context.

System.Object internalObject

The internal object.

Returns
Type Description
System.Boolean

Will always return false, since non-existing URL:s should not be rewritten.

Overrides

TryHandleUrl(UrlRewriteContext, ref Object, ref CachedUrlHandler)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Tries to handle the URL gven in the context.

Declaration
public bool TryHandleUrl(UrlRewriteContext context, ref object internalObject, ref CachedUrlHandler handler)
Parameters
Type Name Description
UrlRewriteContext context

The context for the rewrite. Note that the URL of the context may be modified.

System.Object internalObject

The internal object representation.

CachedUrlHandler handler

The cached handler.

Returns
Type Description
System.Boolean

True if the URL was recognized and handled, False otherwise.

Remarks

Since we are handling a non-existing URL (this will be the last handler in the chain), we will always return True to indicate that it was handled.

Implements

Extension Methods