use isEmpty instead of checking collection size() == 0
add TTL to PersistIndex action