feat: implement clear_cache

This commit is contained in:
Myriad-Dreamin 2024-03-09 14:17:03 +08:00
parent 50bd6af7d8
commit 47e4e43126

View file

@ -519,13 +519,7 @@ impl TypstServer {
/// Clear all cached resources.
pub async fn clear_cache(&self, _arguments: Vec<JsonValue>) -> jsonrpc::Result<()> {
// self.workspace().write().await.clear().map_err(|err| {
// error!("could not clear cache: {err}");
// jsonrpc::Error::internal_error()
// })?;
// self.typst(|_| comemo::evict(0)).await;
comemo::evict(0);
Ok(())
}