WiredViews.Kentico.FluentCacheKeys 2.1.0

Install-Package WiredViews.Kentico.FluentCacheKeys -Version 2.1.0
dotnet add package WiredViews.Kentico.FluentCacheKeys --version 2.1.0
<PackageReference Include="WiredViews.Kentico.FluentCacheKeys" Version="2.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add WiredViews.Kentico.FluentCacheKeys --version 2.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: WiredViews.Kentico.FluentCacheKeys, 2.1.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install WiredViews.Kentico.FluentCacheKeys as a Cake Addin
#addin nuget:?package=WiredViews.Kentico.FluentCacheKeys&version=2.1.0

// Install WiredViews.Kentico.FluentCacheKeys as a Cake Tool
#tool nuget:?package=WiredViews.Kentico.FluentCacheKeys&version=2.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Kentico Fluent Cache Keys

Utility library for generating consistent cache dependency keys for Kentico CMS applications

Install the NuGet Package

Examples

Creating cache keys for pages / documents / nodes

FluentCacheKey.ForPage().WithDocumentId(5);

FluentCacheKey.ForPage().WithNodeId(4);

FluentCacheKey.ForPage().RelationshipsOfNodeId(4);

FluentCacheKey.ForPage().OfSite("Sandbox").WithAliasPath("/home");

FluentCacheKey.ForPage().OfSite("Sandbox").WithAliasPath("/home", "en-us");

FluentCacheKey.ForPages().OfSite("Sandbox").OfClassName(HomePage.CLASS_NAME);

FluentCacheKey.ForPages().OfSite("Sandbox").UnderAliasPath("/home");

Creating cache keys for CMS objects / custom module classes

FluentCacheKey.ForObject().OfClassName(UserInfo.OBJECT_TYPE).WithName("administrator");

FluentCacheKey.ForObject().OfClassName(UserInfo.OBJECT_TYPE).WithGuid(new Guid("9fb0c012-5d9b-4eb6-b5cd-0bb0daffaca0"));

FluentCacheKey.ForObject().OfClassName(UserInfo.OBJECT_TYPE).WithId(2);

FluentCacheKey.ForObjects().OfClassName(UserInfo.OBJECT_TYPE).All();

Creating cache keys for attachments

FluentCacheKey.ForAttachment().WithGuid(new Guid("9fb0c012-5d9b-4eb6-b5cd-0bb0daffaca0"));

FluentCacheKey.ForAttachments().OfDocumentId(4);

FluentCacheKey.ForAttachments().All();

Creating cache keys for media files

FluentCacheKey.ForMediaFile().WithGuid(new Guid("9fb0c012-5d9b-4eb6-b5cd-0bb0daffaca0"));

FluentCacheKey.ForMediaFile().PreviewWithGuid(new Guid("9fb0c012-5d9b-4eb6-b5cd-0bb0daffaca0"));

Creating cache keys for custom tables

FluentCacheKey.ForCustomTable().OfClassName("MyCustomTable").All();

FluentCacheKey.ForCustomTable().OfClassName("MyCustomTable").WithRecordId(5);

References

Kentico Documentation

Blog Posts

  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.1.0 5,778 8/27/2020
2.0.0 4,945 9/2/2019
1.0.0 205 8/30/2019