Skip to content

Improve Caching Schema #50

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

Merged
merged 18 commits into from
Jan 20, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix docstring
  • Loading branch information
Archmonger committed Jan 13, 2022
commit a631c0d0cb982d655ffb0f527f37ab2e61380e11
3 changes: 2 additions & 1 deletion src/django_idom/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@


async def web_modules_file(request: HttpRequest, file: str) -> HttpResponse:
"""Gets a web modules file. Web modules files from cache"""
"""Gets JavaScript required for IDOM modules at runtime. These modules are
returned from cache if available."""
path = IDOM_WED_MODULES_DIR.current.joinpath(*file.split("/")).absolute()
last_modified_time = os.stat(path).st_mtime
cache_key = f"django_idom:web_module:{path}"
Expand Down