Database Reference
In-Depth Information
Figure 3-10 . Before and after TTL expiry for OTP column
5.
It is also possible to reset the TTL value before its expiration
insert into "TTLsample"(user_id,OTP)
values('imvivek','12121') using TTL 160;
// expires OTP after 160 seconds
insert into "TTLsample"(user_id,OTP)
values('imvivek','12121') using TTL 16;
// reset expiry to 16 seonds
Default TTL
With Cassandra 2.x, it is also possible to set the default TTL per column family:
alter table "TTLsample" with default_time_to_live=10;
Figure 3-11 shows the default TTL value set to 10 seconds.
 
 
Search WWH ::




Custom Search