Search code examples
aerospike

Retrieve last_visited value in Aerospike


According to the Aerospike docs you can

use a UDF to compare the last_visited value of a record

How do you access the last_visited value of a record? It is not included in the records metadata.


Solution

  • I believe its implying the last time the record was "touched". It has to be an update, not merely a read. A read does not change the record in any way. A touch operation on the record updates its metadata. In the metadata, look for last_update_time (LUT) (introduced ver 3.8.3+). You can access a record's last_update_time only inside a UDF (Lua - User Defined Function) as record.last_update_time.