You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2010/11/16 21:25:09 UTC

svn commit: r1035785 - in /incubator/chemistry/opencmis/branches/client-api-refactoring: chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/ chemistry-opencmis-client/chemistry-opencmis-c...

Author: fmui
Date: Tue Nov 16 20:25:08 2010
New Revision: 1035785

URL: http://svn.apache.org/viewvc?rev=1035785&view=rev
Log:
new cache implementation

Added:
    incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/NoCacheImpl.java   (with props)
Modified:
    incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java
    incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/Cache.java
    incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/CacheImpl.java
    incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/java/org/apache/chemistry/opencmis/client/runtime/CacheTest.java
    incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameter.java

Modified: incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java?rev=1035785&r1=1035784&r2=1035785&view=diff
==============================================================================
--- incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java (original)
+++ incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java Tue Nov 16 20:25:08 2010
@@ -119,6 +119,7 @@ public class SessionImpl implements Sess
      * Object cache (serializable)
      */
     private Cache cache;
+    private boolean cachePathOmit;
 
     /*
      * Repository info (serializable)
@@ -143,6 +144,8 @@ public class SessionImpl implements Sess
 
         this.objectFactory = createObjectFactory();
         this.cache = createCache();
+
+        cachePathOmit = Boolean.parseBoolean(parameters.get(SessionParameter.CACHE_PATH_OMIT));
     }
 
     private String determineRepositoryId(Map<String, String> parameters) {
@@ -393,7 +396,7 @@ public class SessionImpl implements Sess
         CmisObject result = null;
 
         // ask the cache first
-        if (context.isCacheEnabled()) {
+        if (context.isCacheEnabled() && !cachePathOmit) {
             result = this.cache.getByPath(path, context.getCacheKey());
             if (result != null) {
                 return result;

Modified: incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/Cache.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/Cache.java?rev=1035785&r1=1035784&r2=1035785&view=diff
==============================================================================
--- incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/Cache.java (original)
+++ incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/Cache.java Tue Nov 16 20:25:08 2010
@@ -50,7 +50,5 @@ public interface Cache extends Serializa
 
     void clear();
 
-    void resetPathCache();
-
     int getCacheSize();
 }

Modified: incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/CacheImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/CacheImpl.java?rev=1035785&r1=1035784&r2=1035785&view=diff
==============================================================================
--- incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/CacheImpl.java (original)
+++ incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/CacheImpl.java Tue Nov 16 20:25:08 2010
@@ -18,6 +18,11 @@
  */
 package org.apache.chemistry.opencmis.client.runtime.cache;
 
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+import java.lang.ref.SoftReference;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.Map;
@@ -29,8 +34,8 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.SessionParameter;
 
 /**
- * Non synchronized cache implementation. The cache is limited to a specific
- * size of entries and works in a LRU mode.
+ * Synchronized cache implementation. The cache is limited to a specific size of
+ * entries and works in a LRU mode.
  */
 public class CacheImpl implements Cache {
 
@@ -39,11 +44,14 @@ public class CacheImpl implements Cache 
     private static final float HASHTABLE_LOAD_FACTOR = 0.75f;
 
     private int cacheSize;
+    private int cacheTtl;
+    private int pathToIdSize;
+    private int pathToIdTtl;
 
-    private LinkedHashMap<String, Map<String, CmisObject>> objectMap;
-    private Map<String, String> pathToIdMap;
+    private LinkedHashMap<String, CacheItem<Map<String, CmisObject>>> objectMap;
+    private LinkedHashMap<String, CacheItem<String>> pathToIdMap;
 
-    private final ReentrantReadWriteLock fLock = new ReentrantReadWriteLock();
+    private ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
 
     /**
      * Default constructor.
@@ -52,17 +60,51 @@ public class CacheImpl implements Cache 
     }
 
     public void initialize(Session session, Map<String, String> parameters) {
-        fLock.writeLock().lock();
+        lock.writeLock().lock();
         try {
+            // cache size
             try {
                 cacheSize = Integer.valueOf(parameters.get(SessionParameter.CACHE_SIZE_OBJECTS));
+                if (cacheSize < 0) {
+                    cacheSize = 0;
+                }
             } catch (Exception e) {
                 cacheSize = 1000;
             }
 
+            // cache time-to-live
+            try {
+                cacheTtl = Integer.valueOf(parameters.get(SessionParameter.CACHE_TTL_OBJECTS));
+                if (cacheTtl < 0) {
+                    cacheTtl = 2 * 60 * 60 * 1000;
+                }
+            } catch (Exception e) {
+                cacheTtl = 2 * 60 * 60 * 1000;
+            }
+
+            // path-to-id size
+            try {
+                pathToIdSize = Integer.valueOf(parameters.get(SessionParameter.CACHE_SIZE_PATHTOID));
+                if (pathToIdSize < 0) {
+                    pathToIdSize = 0;
+                }
+            } catch (Exception e) {
+                pathToIdSize = 1000;
+            }
+
+            // path-to-id time-to-live
+            try {
+                pathToIdTtl = Integer.valueOf(parameters.get(SessionParameter.CACHE_TTL_PATHTOID));
+                if (pathToIdTtl < 0) {
+                    pathToIdTtl = 30 * 60 * 1000;
+                }
+            } catch (Exception e) {
+                pathToIdTtl = 30 * 60 * 1000;
+            }
+
             initializeInternals();
         } finally {
-            fLock.writeLock().unlock();
+            lock.writeLock().unlock();
         }
     }
 
@@ -70,25 +112,40 @@ public class CacheImpl implements Cache 
      * Sets up the internal objects.
      */
     private void initializeInternals() {
-        fLock.writeLock().lock();
+        lock.writeLock().lock();
         try {
-            int hashTableCapacity = (int) Math.ceil(cacheSize / HASHTABLE_LOAD_FACTOR) + 1;
+            // object cache
+            int cacheHashTableCapacity = (int) Math.ceil(cacheSize / HASHTABLE_LOAD_FACTOR) + 1;
 
             final int cs = cacheSize;
 
-            objectMap = new LinkedHashMap<String, Map<String, CmisObject>>(hashTableCapacity, HASHTABLE_LOAD_FACTOR) {
+            objectMap = new LinkedHashMap<String, CacheItem<Map<String, CmisObject>>>(cacheHashTableCapacity,
+                    HASHTABLE_LOAD_FACTOR) {
 
                 private static final long serialVersionUID = 1L;
 
                 @Override
-                protected boolean removeEldestEntry(Map.Entry<String, Map<String, CmisObject>> eldest) {
+                protected boolean removeEldestEntry(Map.Entry<String, CacheItem<Map<String, CmisObject>>> eldest) {
                     return size() > cs;
                 }
             };
 
-            resetPathCache();
+            // path-to-id mapping
+            int pathtoidHashTableCapacity = (int) Math.ceil(pathToIdSize / HASHTABLE_LOAD_FACTOR) + 1;
+
+            final int ptis = pathToIdSize;
+
+            pathToIdMap = new LinkedHashMap<String, CacheItem<String>>(pathtoidHashTableCapacity, HASHTABLE_LOAD_FACTOR) {
+
+                private static final long serialVersionUID = 1L;
+
+                @Override
+                protected boolean removeEldestEntry(Map.Entry<String, CacheItem<String>> eldest) {
+                    return size() > ptis;
+                }
+            };
         } finally {
-            fLock.writeLock().unlock();
+            lock.writeLock().unlock();
         }
     }
 
@@ -96,79 +153,69 @@ public class CacheImpl implements Cache 
         initializeInternals();
     }
 
-    public void resetPathCache() {
-        fLock.writeLock().lock();
-        try {
-            pathToIdMap = new HashMap<String, String>();
-        } finally {
-            fLock.writeLock().unlock();
-        }
-    }
-
     public boolean containsId(String objectId, String cacheKey) {
-        fLock.readLock().lock();
+        lock.writeLock().lock();
         try {
             if (!objectMap.containsKey(objectId)) {
                 return false;
             }
 
-            return objectMap.get(objectId).containsKey(cacheKey);
+            CacheItem<Map<String, CmisObject>> item = objectMap.get(objectId);
+            if (item.isExpired()) {
+                objectMap.remove(objectId);
+                return false;
+            }
+
+            return true;
         } finally {
-            fLock.readLock().unlock();
+            lock.writeLock().unlock();
         }
     }
 
     public boolean containsPath(String path, String cacheKey) {
-        fLock.readLock().lock();
+        lock.writeLock().lock();
         try {
             if (!pathToIdMap.containsKey(path)) {
                 return false;
             }
 
-            return containsId(pathToIdMap.get(path), cacheKey);
+            CacheItem<String> item = pathToIdMap.get(path);
+            if (item.isExpired() || !containsId(item.getItem(), cacheKey)) {
+                pathToIdMap.remove(path);
+                return false;
+            }
+
+            return true;
         } finally {
-            fLock.readLock().unlock();
+            lock.writeLock().unlock();
         }
     }
 
     public CmisObject getById(String objectId, String cacheKey) {
-        fLock.readLock().lock();
+        lock.writeLock().lock();
         try {
-            Map<String, CmisObject> cacheKeyMap = objectMap.get(objectId);
-            if (cacheKeyMap == null) {
-                return null; // not found
+            if (!containsId(objectId, cacheKey)) {
+                return null;
             }
 
-            return cacheKeyMap.get(cacheKey);
+            Map<String, CmisObject> item = objectMap.get(objectId).getItem();
+            return (item == null ? null : item.get(cacheKey));
         } finally {
-            fLock.readLock().unlock();
+            lock.writeLock().unlock();
         }
     }
 
     public CmisObject getByPath(String path, String cacheKey) {
-        fLock.readLock().lock();
+        lock.writeLock().lock();
         try {
-            String id = pathToIdMap.get(path);
-            if (id == null) {
-                return null; // not found
+            if (!containsPath(path, cacheKey)) {
+                return null;
             }
 
-            CmisObject object = getById(id, cacheKey);
-            if ((object == null) && (!objectMap.containsKey(id))) {
-                // clean up
-                fLock.readLock().unlock();
-                fLock.writeLock().lock();
-                try {
-                    pathToIdMap.remove(path);
-                } finally {
-                    fLock.writeLock().unlock();
-                    fLock.readLock().lock();
-                }
-            }
-
-            return object;
+            CacheItem<String> item = pathToIdMap.get(path);
+            return getById(item.getItem(), cacheKey);
         } finally {
-            fLock.readLock().unlock();
+            lock.writeLock().unlock();
         }
     }
 
@@ -183,42 +230,101 @@ public class CacheImpl implements Cache 
             return;
         }
 
-        fLock.writeLock().lock();
+        lock.writeLock().lock();
         try {
             // get cache key map
-            Map<String, CmisObject> cacheKeyMap = objectMap.get(object.getId());
+            CacheItem<Map<String, CmisObject>> cacheKeyMap = objectMap.get(object.getId());
             if (cacheKeyMap == null) {
-                cacheKeyMap = new HashMap<String, CmisObject>();
+                cacheKeyMap = new CacheItem<Map<String, CmisObject>>(new HashMap<String, CmisObject>(), cacheTtl);
                 objectMap.put(object.getId(), cacheKeyMap);
             }
 
             // put into id cache
-            cacheKeyMap.put(cacheKey, object);
+            Map<String, CmisObject> m = cacheKeyMap.getItem();
+            if (m != null) {
+                m.put(cacheKey, object);
+            }
 
             // folders may have a path, use it!
             String path = object.getPropertyValue(PropertyIds.PATH);
             if (path != null) {
-                pathToIdMap.put(path, object.getId());
+                pathToIdMap.put(path, new CacheItem<String>(object.getId(), pathToIdTtl));
             }
         } finally {
-            fLock.writeLock().unlock();
+            lock.writeLock().unlock();
         }
     }
 
     public void putPath(String path, CmisObject object, String cacheKey) {
-        fLock.writeLock().lock();
+        if (path == null) {
+            return;
+        }
+
+        lock.writeLock().lock();
         try {
             put(object, cacheKey);
 
             if ((object != null) && (object.getId() != null) && (cacheKey != null)) {
-                pathToIdMap.put(path, object.getId());
+                pathToIdMap.put(path, new CacheItem<String>(object.getId(), pathToIdTtl));
             }
         } finally {
-            fLock.writeLock().unlock();
+            lock.writeLock().unlock();
         }
     }
 
     public int getCacheSize() {
         return this.cacheSize;
     }
+
+    // --- cache item ---
+
+    private class CacheItem<T> implements Serializable {
+
+        private static final long serialVersionUID = 1L;
+
+        private SoftReference<T> item;
+        private long timestamp;
+        private int ttl;
+
+        public CacheItem(T item, int ttl) {
+            this.item = new SoftReference<T>(item);
+            timestamp = System.currentTimeMillis();
+            this.ttl = ttl;
+        }
+
+        public synchronized boolean isExpired() {
+            if ((item == null) || (item.get() == null)) {
+                return true;
+            }
+
+            return (timestamp + ttl < System.currentTimeMillis());
+        }
+
+        public synchronized T getItem() {
+            if (isExpired()) {
+                item = null;
+                return null;
+            }
+
+            timestamp = System.currentTimeMillis();
+            return item.get();
+        }
+
+        private void writeObject(ObjectOutputStream out) throws IOException {
+            out.writeObject(isExpired() ? null : item.get());
+            out.writeLong(timestamp);
+            out.writeInt(ttl);
+        }
+
+        private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
+            @SuppressWarnings("unchecked")
+            T object = (T) in.readObject();
+            timestamp = in.readLong();
+            ttl = in.readInt();
+
+            if ((object != null) && (timestamp + ttl >= System.currentTimeMillis())) {
+                this.item = new SoftReference<T>(object);
+            }
+        }
+    }
 }

Added: incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/NoCacheImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/NoCacheImpl.java?rev=1035785&view=auto
==============================================================================
--- incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/NoCacheImpl.java (added)
+++ incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/NoCacheImpl.java Tue Nov 16 20:25:08 2010
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.client.runtime.cache;
+
+import java.util.Map;
+
+import org.apache.chemistry.opencmis.client.api.CmisObject;
+import org.apache.chemistry.opencmis.client.api.Session;
+
+public class NoCacheImpl implements Cache {
+
+    private static final long serialVersionUID = 1L;
+
+    public void initialize(Session session, Map<String, String> parameters) {
+    }
+
+    public boolean containsId(String objectId, String cacheKey) {
+        return false;
+    }
+
+    public boolean containsPath(String path, String cacheKey) {
+        return false;
+    }
+
+    public void put(CmisObject object, String cacheKey) {
+    }
+
+    public void putPath(String path, CmisObject object, String cacheKey) {
+    }
+
+    public CmisObject getById(String objectId, String cacheKey) {
+        return null;
+    }
+
+    public CmisObject getByPath(String path, String cacheKey) {
+        return null;
+    }
+
+    public void clear() {
+    }
+
+    public int getCacheSize() {
+        return 0;
+    }
+}

Propchange: incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/cache/NoCacheImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/java/org/apache/chemistry/opencmis/client/runtime/CacheTest.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/java/org/apache/chemistry/opencmis/client/runtime/CacheTest.java?rev=1035785&r1=1035784&r2=1035785&view=diff
==============================================================================
--- incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/java/org/apache/chemistry/opencmis/client/runtime/CacheTest.java (original)
+++ incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/java/org/apache/chemistry/opencmis/client/runtime/CacheTest.java Tue Nov 16 20:25:08 2010
@@ -43,7 +43,7 @@ public class CacheTest {
 
     @Test
     public void cacheSingleObjectTest() {
-        Cache cache = createCache(100);
+        Cache cache = createCache(100, 3600 * 1000);
 
         String id = "1";
         // String path = "/1";
@@ -74,14 +74,14 @@ public class CacheTest {
     @Test
     public void cacheSizeTest() {
         int cacheSize = 50000;
-        Cache cache = createCache(cacheSize);
+        Cache cache = createCache(cacheSize, 3600 * 1000);
         Assert.assertEquals(cacheSize, cache.getCacheSize());
     }
 
     @Test
     public void lruTest() {
         int cacheSize = 3;
-        Cache cache = createCache(cacheSize);
+        Cache cache = createCache(cacheSize, 3600 * 1000);
 
         String cacheKey = "key";
 
@@ -96,10 +96,28 @@ public class CacheTest {
         Assert.assertNotNull(cache.getById("id3", cacheKey));
     }
 
+    @SuppressWarnings("static-access")
+    @Test
+    public void ttlTest() throws InterruptedException {
+        Cache cache = createCache(10, 500);
+
+        String cacheKey = "key";
+        String id = "id";
+
+        CmisObject obj = this.createCmisObject(id);
+        cache.put(obj, cacheKey);
+
+        Assert.assertNotNull(cache.getById(id, cacheKey));
+
+        Thread.currentThread().sleep(501);
+
+        Assert.assertNull(cache.getById(id, cacheKey));
+    }
+
     @Test
     public void serializationTest() throws IOException, ClassNotFoundException {
         int cacheSize = 10;
-        Cache cache = createCache(cacheSize);
+        Cache cache = createCache(cacheSize, 3600 * 1000);
 
         String cacheKey = "key";
 
@@ -135,11 +153,12 @@ public class CacheTest {
         return new CmisObjectMock(id);
     }
 
-    private Cache createCache(int cacheSize) {
+    private Cache createCache(int cacheSize, int ttl) {
         Cache cache = new CacheImpl();
 
         Map<String, String> parameters = new HashMap<String, String>();
         parameters.put(SessionParameter.CACHE_SIZE_OBJECTS, "" + cacheSize);
+        parameters.put(SessionParameter.CACHE_TTL_OBJECTS, "" + ttl);
 
         cache.initialize(null, parameters);
 

Modified: incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameter.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameter.java?rev=1035785&r1=1035784&r2=1035785&view=diff
==============================================================================
--- incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameter.java (original)
+++ incubator/chemistry/opencmis/branches/client-api-refactoring/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameter.java Tue Nov 16 20:25:08 2010
@@ -70,8 +70,12 @@ public final class SessionParameter {
      */
     public static final String AUTH_SOAP_USERNAMETOKEN = "org.apache.chemistry.opencmis.binding.auth.soap.usernametoken";
 
-    public static final String CACHE_SIZE_OBJECTS = "org.apache.chemistry.opencmis.cache.size";
-
+    public static final String CACHE_SIZE_OBJECTS = "org.apache.chemistry.opencmis.cache.objects.size";
+    public static final String CACHE_TTL_OBJECTS = "org.apache.chemistry.opencmis.cache.objects.ttl";
+    public static final String CACHE_SIZE_PATHTOID = "org.apache.chemistry.opencmis.cache.pathtoid.size";
+    public static final String CACHE_TTL_PATHTOID = "org.apache.chemistry.opencmis.cache.pathtoid.ttl";
+    public static final String CACHE_PATH_OMIT = "org.apache.chemistry.opencmis.cache.path.omit";
+    
     public static final String CACHE_SIZE_REPOSITORIES = "org.apache.chemistry.opencmis.binding.cache.repositories.size";
     public static final String CACHE_SIZE_TYPES = "org.apache.chemistry.opencmis.binding.cache.types.size";
     public static final String CACHE_SIZE_LINKS = "org.apache.chemistry.opencmis.binding.cache.links.size";