<reset-cache>
Purpose/Function
Reposition the cursor of a Trebuchet cache. Requires a cache reference from the environment. Cache must be open or an exception will be thrown.
Attributes
NAME |
TYPE |
DEFAULT VALUE |
DESCRIPTION |
---|---|---|---|
cache |
|
(required) |
cache whose cursor is to be reset |
end |
|
false |
put the cursor at the end of the cache (after last entry) |
entryIndex |
|
|
put the cursor at the beginning of the kth (= index) entry |
entryId |
|
|
put the cursor at the entry id (the first byte of the entry) |
firstEntry |
|
true |
put the cursor at the beginning of the first entry |
lastEntry |
|
false |
put the cursor at the beginning of the last entry |
Elements
None.
ReturnValues
None.
NOTES
Examples
<ogrescript> ... <declare name="cache"/> <ls dir="file:/tmp/dir0"> <return-value assignedName="cache" defaultName="listCache"/> </ls> <open-cache cache="${cache}"/> <reset-cache end="true"/> <while condition="$E{true}"> <cache-entry previous="true" cache="${cache}"> <return-value assignedName="entry" defaultName="entryString"/> </cache-entry> <if> <is-null object="${entry}"/> <break/> </if> <echo message="${entry}" stdout="true"/> </while> ... </ogrescript>