Home > Contents > Index >
CacheManager.RecordItem
Records an item as a cache dependency for a page.
A cache dependency is an item which, when changed, invalidates the copy of a page that is stored in the cache. Recording an item as a cache dependency allows you to create a list of pages containing that cache dependency item.
This method has two variants, both of which record an item as a cache dependency. The difference is:
- RecordItem (Variant 1) lets you set the date and time that the item was updated.
- RecordItem (Variant 2) automatically sets the date and time that the item was updated to the current date and time.
CacheManager.RecordItem
Records an item as a cache dependency for a page. Use this variant if you want to set the date that the item was updated.
Syntax
public static boolean RecordItem(ICS ics, String itemID, String dateModified)Parameters
ics
- The ICS context.
itemID
- A string that uniquely identifies the item you want to record. For example,
Article-9876835
where9876835
is a unique ID for an asset of typeArticle
.
dateModified
- The SQL date format for the date and time when the item was last modified. If this parameter is left null, the current date and time are used.
Description
The
RecordItem
method records an item as a cache dependency for a page. Use this variant if you want to set the date that the item was updated.Returns
Returns
true
if the item has been recorded in the page inventory list. Returnsfalse
if the item has not been recorded or if the page inventory is disabled.
CacheManager.RecordItem
Records an item as a cache dependency for a page. Use this variant if you want to use the current date as the item's updated date.
Syntax
public static boolean RecordItem(ICS ics, String itemID)Parameters
ics
- The ICS context.
itemID
- A string that uniquely identifies the item you want to record. For example,
Article-9876835
, where9876835
is a unique ID for an asset of type Article.
Description
The
RecordItem
method records an item as a cache dependency for a page. Use this variant if you want to use the current date as the item's updated date.Returns
Returns
true
if the item has been recorded in the page inventory list. Returnsfalse
if the item has not been recorded or if the page inventory is disabled.
Home > Contents > Index > ![]()
Oracle JAVA Reference
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.