Skip to content
Open
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
4 changes: 3 additions & 1 deletion src/bokeh/server/views/static_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ def append_version(cls, path: str) -> str:
if settings.dev:
return path
else:
version = StaticFileHandler.get_version(dict(static_path=settings.bokehjs_path()), path)
if not hasattr(cls, "_static_path_cache"):
cls._static_path_cache = dict(static_path=settings.bokehjs_path())
version = StaticFileHandler.get_version(cls._static_path_cache, path)
return f"{path}?v={version}"

#-----------------------------------------------------------------------------
Expand Down
13 changes: 2 additions & 11 deletions src/bokeh/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,8 @@
from enum import Enum, auto
from os.path import join
from pathlib import Path
from typing import (
TYPE_CHECKING,
Any,
Callable,
Generic,
Literal,
Sequence,
TypeAlias,
TypeVar,
cast,
)
from typing import (TYPE_CHECKING, Any, Callable, Generic, Literal, Sequence,
TypeAlias, TypeVar, cast)

# External imports
import yaml
Expand Down