Commit 4e437011 authored by Liang Ding's avatar Liang Ding

🐛 Fix #12912

parent 837a3713
...@@ -30,7 +30,7 @@ import java.util.concurrent.ConcurrentHashMap; ...@@ -30,7 +30,7 @@ import java.util.concurrent.ConcurrentHashMap;
* Article cache. * Article cache.
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.2.0.1, Sep 25, 2018 * @version 1.2.1.0, Sep 20, 2019
* @since 2.3.0 * @since 2.3.0
*/ */
@Singleton @Singleton
...@@ -92,7 +92,13 @@ public class ArticleCache { ...@@ -92,7 +92,13 @@ public class ArticleCache {
* @param id the specified article id * @param id the specified article id
*/ */
public void removeArticle(final String id) { public void removeArticle(final String id) {
final JSONObject article = idCache.get(id);
if (null == article) {
return;
}
final String permalink = article.optString(Article.ARTICLE_PERMALINK);
idCache.remove(id); idCache.remove(id);
permalinkCache.remove(permalink);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment