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

Tweak to remote file system caching for improved page loads #435

Merged
merged 2 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ repos:
- id: generate-schemas
name: Regenerate item model JSONSchemas
description: Check if the current code changes have enacted changes to the resulting JSONSchemas
entry: pipenv run invoke -r pydatalab dev.generate-schemas
entry: invoke -r pydatalab dev.generate-schemas
pass_filenames: false
language: python
5 changes: 4 additions & 1 deletion pydatalab/pydatalab/remote_filesystems.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ def get_directory_structure(
# then rebuild the cache.
if (
(not cached_dir_structure)
or cache_age > datetime.timedelta(minutes=CONFIG.REMOTE_CACHE_MAX_AGE)
or (
invalidate_cache is not False
and cache_age > datetime.timedelta(minutes=CONFIG.REMOTE_CACHE_MAX_AGE)
)
or (
invalidate_cache
and cache_age > datetime.timedelta(minutes=CONFIG.REMOTE_CACHE_MIN_AGE)
Expand Down
Loading