When data is retrieved from the origin volume, the file that contains that data is considered valid in the FlexCache volume as long as a delegation exists for that file. If no delegation exists, the file is considered valid for a certain length of time, specified by the attribute cache timeout.
If a client requests data from a file for which there are no delegations, and the attribute cache timeout has been exceeded, the FlexCache volume compares the file attributes of the cached file with the attributes of the file on the origin system. Then one of the following actions is taken:
- If the two sets of file attributes match, the requested data is directly returned to the client (if it was already in the FlexCache volume) or retrieved from the origin system and then returned to the client.
- If the two sets of file attributes do not match, the file is marked as invalid in the cache. Then the requested data blocks are read from the origin system and stored in the FlexCache volume, as if it were the first time that file had been accessed from that FlexCache volume.
With attribute cache timeouts, clients can get stale data when all of the following conditions are true:
- There are no delegations for the file on the caching volume.
- The file’s attribute cache timeout has not been reached.
- The file has changed on the origin volume since it was last accessed by the caching volume.
Note: Clients can get stale data when a file on the origin volume is added to or removed from a directory that is already stored on the FlexCache volume. The file addition or deletion does not become visible on the FlexCache until the length of time specified in the directory attribute cache timeout (acdirmax) has passed since the last time the directory was updated on the FlexCache volume.
To prevent clients from ever getting stale data, you can set the attribute cache timeout to 0. However, this negatively affects your caching performance, because every data request for which there is no delegation causes an access to the origin system.
The attribute cache timeouts are determined by using volume options. The option names and default values are outlined in the following table.
||Default value (seconds)
||Attribute cache timeout for directories
||Attribute cache timeout for regular files
||Attribute cache timeout for symbolic links
||Attribute cache timeout for all objects
For more information about modifying these options, see the na_vol(1) man page.