How use cache in plugin dvelpoment?
已回答
I am wrinting a plugin that will grab some information from PsiElement and the make http request. And when I run this logic for all files in the project - performance will be very slow. So I need a cache that can reuse value from http. Also it should cleaned up or reintialized by schedule. Is there something similar in IntelliJ Idea plugin sdk? A clear example from github will be greate!
请先登录再写评论。
It’s hard to give general recommendations. There are plenty of dedicated 3rd party libraries offering such feature, e.g. Guava.
Eventually
com.intellij.util.containers.SLRUCache/com.intellij.util.containers.SLRUMapfrom IntelliJ Platform might suit your needs.