I'm guessing there's more to your iRule, as "set persist_ttl indefinite" just sets the value of the persist_ttl variable to the value "indefinite". Generally speaking you'd need to use either the persist or persist add command in an iRule to set or retrieve a persistence table entry.
https://devcentral.f5.com/wiki/iRules.persist.ashx
In the absence of a timeout value the default timeout is 180 seconds. Also recognize that this is an idle timeout, so the persistence entry would have to go untouched for that amount time. It's probably not advisable to create a "permanent" persistence entry, given that you'd essentially be permanently storing persistence information for clients that have long since left the application.