Skip to content

Commit

Permalink
Cache datetimes
Browse files Browse the repository at this point in the history
  • Loading branch information
paveldedik committed Jun 16, 2022
1 parent a34f4e8 commit b9a3870
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions neon/tokens.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import functools

import dateutil.parser

from . import errors
Expand Down Expand Up @@ -150,6 +152,7 @@ class DateTime(Primitive):
re = None

@classmethod
@functools.lru_cache(maxsize=None)
def convert(cls, string):
try:
return dateutil.parser.parse(string)
Expand Down

0 comments on commit b9a3870

Please sign in to comment.