From 6e5a54f70789d6d879cd5a121e96b5eb8340a8e9 Mon Sep 17 00:00:00 2001 From: James Rutherford Date: Mon, 9 Apr 2007 10:51:02 +0000 Subject: [PATCH] (Richard Jones) - SF Patch #1659841 Add option to clear context object cache git-svn-id: http://scm.dspace.org/svn/repo/trunk@1777 9c30dcfa-912a-0410-8fc2-9e0234be79fd --- dspace/CHANGES | 1 + dspace/src/org/dspace/core/Context.java | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/dspace/CHANGES b/dspace/CHANGES index a7e80cdfa4..b09d507795 100644 --- a/dspace/CHANGES +++ b/dspace/CHANGES @@ -17,6 +17,7 @@ - SF Patch #1659901 Import community and collection structure - SF Patch #1659837 ItemIterator now deals with item ids also - SF Patch #1659796 Create administrator wtih command line options +- SF Patch #1659841 Add option to clear context object cache (Mike Judd) - SF Patch #1528142 Malformed OAI-PMH response: illegal bytes in UTF-8 for SF Bug #1490162 diff --git a/dspace/src/org/dspace/core/Context.java b/dspace/src/org/dspace/core/Context.java index 614664656e..60cd24d635 100644 --- a/dspace/src/org/dspace/core/Context.java +++ b/dspace/src/org/dspace/core/Context.java @@ -321,6 +321,14 @@ public class Context objectCache.remove(key); } + /** + * Remove all the objects from the object cache + */ + public void clearCache() + { + objectCache.clear(); + } + /** * set membership in a special group *