Skip to content

Commit

Permalink
Use lru_cache to accelerate timestamp queries (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
liang2kl committed Feb 12, 2023
1 parent aaee209 commit eb5d636
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mkdocs_blogging_plugin/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
from babel.dates import format_date, format_datetime
import locale
from datetime import datetime
from functools import lru_cache

logger = logging.getLogger("mkdocs.plugins")

Expand All @@ -63,6 +64,7 @@ def _get_repo(self, path: str) -> Git:
return self.repo_cache[path]


@lru_cache
def get_git_commit_timestamp(
self,
path: str,
Expand Down

0 comments on commit eb5d636

Please sign in to comment.