Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to i can make a wide-table by TTL time? #121

Open
mohsenjavidpanah opened this issue Oct 22, 2018 · 3 comments
Open

How to i can make a wide-table by TTL time? #121

mohsenjavidpanah opened this issue Oct 22, 2018 · 3 comments

Comments

@mohsenjavidpanah
Copy link

Hi guys
i have a wide-table for store verification codes, i want auto delete this data after some minutes
I don't find any documentation about how to do it, guide me to set TTL of my model

Thank You

@oneandonlyonebutyou
Copy link

Me too.
I wonder how I could use TTL settings.

@mdczaplicki
Copy link

You can set the TTL in model's __options__ dictionary.

Add this to your model:

    __options__ = {
        "default_time_to_live": 2
    }

@pawel1830
Copy link

pawel1830 commented Oct 26, 2020

If found

# TODO __default__ttl__ should be removed in the next major release

So what is an alternative for "default_time_to_live" ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants