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

cache: better cache system #4951

Merged
merged 6 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
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
fixup! cache: better scoped cache
  • Loading branch information
uael committed Dec 20, 2024
commit 682337ee1886a0ba053fed3f28e989c08ce11520
11 changes: 1 addition & 10 deletions backend/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions backend/windmill-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ parquet = ["dep:object_store", "dep:aws-config", "dep:aws-sdk-sts"]
otel = ["dep:opentelemetry-semantic-conventions", "dep:opentelemetry-otlp", "dep:opentelemetry_sdk",
"dep:opentelemetry", "dep:tracing-opentelemetry", "dep:opentelemetry-appender-tracing", "dep:tonic"]
smtp = ["dep:mail-send"]
scoped_cache = ["dep:mktemp"]
scoped_cache = []

[lib]
name = "windmill_common"
Expand Down Expand Up @@ -66,7 +66,7 @@ croner = "2.0.6"
quick_cache.workspace = true
pin-project-lite.workspace = true
futures.workspace = true
mktemp = { version = "^0", optional = true }
tempfile.workspace = true

opentelemetry-semantic-conventions = { workspace = true, optional = true }
opentelemetry-otlp = { workspace = true, optional = true }
Expand Down
4 changes: 2 additions & 2 deletions backend/windmill-common/src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ lazy_static! {
#[cfg(feature = "scoped_cache")]
lazy_static! {
/// Temporary directory for thread-local cache.
pub static ref CACHE_PATH_TMP: mktemp::Temp = {
mktemp::Temp::new_dir().expect("Failed to create temporary directory")
pub static ref CACHE_PATH_TMP: tempfile::TempDir = {
tempfile::tempdir().expect("Failed to create temporary directory")
};

/// Cache directory for windmill server/worker(s).
Expand Down