Skip to content

Commit 4489a85

Browse files
committed
Set cache maxsize
1 parent d8b220a commit 4489a85

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

logya/content.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616

1717
def content_type(path: Path) -> str | None:
18-
"""Return content type based in file extensions."""
18+
"""Return content type based on file extension."""
1919

2020
if path.suffix in {'.html', '.htm'}:
2121
return 'html'

logya/template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def _sort_docs(item: dict, key: str) -> Any:
6868
return value.casefold() if isinstance(value, str) else value
6969

7070

71-
@lru_cache
71+
@lru_cache(maxsize=256)
7272
def _get_docs(L, url: str, sort_attr: str = 'created', sort_order: str = 'descending') -> list:
7373
docs = []
7474
# A collection index will only exist at the given URL if there is no content document with the same URL.

0 commit comments

Comments
 (0)