Skip to content

Commit

Permalink
docs: noted incremental generation/revalidation quirks in examples
Browse files Browse the repository at this point in the history
Just that revalidation will occur constantly in development when used
with incremental generation.
  • Loading branch information
arctic-hen7 committed Sep 10, 2022
1 parent 76ed6fc commit 8fd19c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ pub fn get_template<G: Html>() -> Template<G> {
.should_revalidate_fn(should_revalidate)
.build_state_fn(get_build_state)
.build_paths_fn(get_build_paths)
// WARNING: this will revalidate on every reload in development, because incremental
// generation is recalculated on every request in development
.incremental_generation()
}

Expand Down
2 changes: 1 addition & 1 deletion packages/perseus/src/template/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use crate::utils::AsyncFnReturn;
#[cfg(not(target_arch = "wasm32"))]
use crate::utils::ComputedDuration;
use crate::utils::PerseusDuration; /* We do actually want this in both the engine and the
* browser */
* browser */
use crate::Html;
#[cfg(not(target_arch = "wasm32"))]
use crate::Request;
Expand Down

0 comments on commit 8fd19c8

Please sign in to comment.