The Get-and-Touch gat() method obtains a
value for a given key and update the expiry time for the key. This
can be useful for session values and other information where you
want to set an expiry time, but don't want the value to expire
while the value is still in use.
| API Call | object.gat(key, expiry) | ||
| Asynchronous | no | ||
| Description | Get a value and update the expiration time for a given key | ||
| Returns | (none) | ||
| Arguments | |||
key | Document ID used to identify the value | ||
expiry | Expiry time for key. Values larger than 30*24*60*60 seconds (30 days) are interpreted as absolute times (from the epoch). | ||
The gat() function obtains a given value
and updates the expiry time. For example, to get session data and
renew the expiry time to five minutes:
membase.gat('sessionid',300);