Skip to content

Commit

Permalink
remove things not yet used (persistence)
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Aug 9, 2024
1 parent 3610a94 commit 41dcae6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
12 changes: 0 additions & 12 deletions turbopack/crates/turbo-tasks-backend/src/backend/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,15 @@ use dashmap::{mapref::one::RefMut, DashMap};
use rustc_hash::FxHasher;
use turbo_tasks::KeyValuePair;

enum PersistanceState {
/// We know that all state of the object is only in the cache and nothing is
/// stored in the persistent cache.
CacheOnly,
/// We know that some state of the object is stored in the persistent cache.
Persisted,
/// We have never checked the persistent cache for the state of the object.
Unknown,
}

pub struct InnerStorage<T: KeyValuePair> {
// TODO consider adding some inline storage
map: AutoMap<T::Key, T::Value>,
persistance_state: PersistanceState,
}

impl<T: KeyValuePair> InnerStorage<T> {
fn new() -> Self {
Self {
map: AutoMap::new(),
persistance_state: PersistanceState::Unknown,
}
}

Expand Down
4 changes: 4 additions & 0 deletions turbopack/crates/turbo-tasks-backend/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,11 @@ impl CachedDataItemValue {
}

pub struct CachedDataUpdate {
// TODO persistence
#[allow(dead_code)]
pub task: TaskId,
#[allow(dead_code)]
pub key: CachedDataItemKey,
#[allow(dead_code)]
pub value: Option<CachedDataItemValue>,
}

0 comments on commit 41dcae6

Please sign in to comment.