Skip to content

Dynamically set TTL on an individual record #132

@ajeetdsouza

Description

@ajeetdsouza

Hi, I'm trying to set a TTL when saving an individual record, but the AeroMapper.save() function overrides it. How can I save a record with a different TTL than the default?

This is what I'm trying to do:

WritePolicy policy = new WritePolicy(client.writePolicyDefault);
policy.expiration = 10;
mapper.save(policy, shortLink);

This is the offending code:

if (ttl != null) {
writePolicy.expiration = ttl;
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions