v1.80.3
What's Changed
- feat(cache): add caching backend feat flag by @j-mendez in #156
- chore(chrome_intercept): fix intercept redirect initial domain
- perf(chrome_intercept): improve intercept handling of assets
Example:
Make sure to have the feat flag [cache
] enabled. Storing cache in memory can be done with the flag [cache_mem
] instead of using disk space.
extern crate spider;
use spider::tokio;
use spider::website::Website;
#[tokio::main]
async fn main() {
// we can use the builder method to enable caching or set `website.cache` to true directly.
let mut website: Website = Website::new("https://rsseau.fr")
.with_caching(true)
.build()
.unwrap();
website.crawl().await;
println!("Links found {:?}", website.get_links().len());
/// next run to website.crawl().await; will be faster since content is stored on disk.
}
Full Changelog: v1.70.4...v1.80.3