Index: src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
===================================================================
--- src/main/java/com/xpn/xwiki/doc/XWikiDocument.java	(revision 28450)
+++ src/main/java/com/xpn/xwiki/doc/XWikiDocument.java	(working copy)
@@ -117,6 +117,7 @@
 import com.xpn.xwiki.content.parsers.ReplacementResultCollection;
 import com.xpn.xwiki.criteria.impl.RevisionCriteria;
 import com.xpn.xwiki.doc.rcs.XWikiRCSNodeInfo;
+import com.xpn.xwiki.internal.RenderingCache;
 import com.xpn.xwiki.internal.xml.DOMXMLWriter;
 import com.xpn.xwiki.internal.xml.XMLWriter;
 import com.xpn.xwiki.objects.BaseCollection;
@@ -417,6 +418,10 @@
      */
     private SyntaxFactory syntaxFactory = Utils.getComponent(SyntaxFactory.class);
 
+    private Execution execution = Utils.getComponent(Execution.class);
+
+    private RenderingCache renderingCache = Utils.getComponent(RenderingCache.class);
+
     /**
      * @since 2.2M1
      */
@@ -775,30 +780,37 @@
         // document's context. For example this is true for the Admin page, see
         // http://jira.xwiki.org/jira/browse/XWIKI-4274 for more details.
 
-        String renderedContent;
-        Object isInRenderingEngine = context.get("isInRenderingEngine");
+        String source = getTranslatedContent(context);
 
-        try {
-            // This tells display() methods that we are inside the rendering engine and thus
-            // that they can return wiki syntax and not HTML syntax (which is needed when
-            // outside the rendering engine, i.e. when we're inside templates using only
-            // Velocity for example).
-            context.put("isInRenderingEngine", true);
+        String renderedContent = this.renderingCache.getRenderedContent(getDocumentReference(), source, context);
 
-            // If the Syntax id is "xwiki/1.0" then use the old rendering subsystem. Otherwise use the new one.
-            if (is10Syntax()) {
-                renderedContent = context.getWiki().getRenderingEngine().renderDocument(this, context);
-            } else {
-                renderedContent =
-                        performSyntaxConversion(getTranslatedContent(context), getSyntaxId(), targetSyntax, true);
-            }
-        } finally {
-            if (isInRenderingEngine != null) {
-                context.put("isInRenderingEngine", isInRenderingEngine);
-            } else {
-                context.remove("isInRenderingEngine");
+        if (renderedContent == null) {
+            Object isInRenderingEngine = context.get("isInRenderingEngine");
+
+            try {
+                // This tells display() methods that we are inside the rendering engine and thus
+                // that they can return wiki syntax and not HTML syntax (which is needed when
+                // outside the rendering engine, i.e. when we're inside templates using only
+                // Velocity for example).
+                context.put("isInRenderingEngine", true);
+
+                // If the Syntax id is "xwiki/1.0" then use the old rendering subsystem. Otherwise use the new one.
+                if (is10Syntax()) {
+                    renderedContent = context.getWiki().getRenderingEngine().renderDocument(this, context);
+                } else {
+                    renderedContent = performSyntaxConversion(source, getSyntaxId(), targetSyntax, true);
+                }
+
+                this.renderingCache.setRenderedContent(getDocumentReference(), source, renderedContent, context);
+            } finally {
+                if (isInRenderingEngine != null) {
+                    context.put("isInRenderingEngine", isInRenderingEngine);
+                } else {
+                    context.remove("isInRenderingEngine");
+                }
             }
         }
+
         return renderedContent;
     }
 
@@ -828,41 +840,47 @@
      */
     public String getRenderedContent(String text, String sourceSyntaxId, String targetSyntaxId, XWikiContext context)
     {
-        String result;
-        Map<String, Object> backup = new HashMap<String, Object>();
-        Object isInRenderingEngine = context.get("isInRenderingEngine");
-        try {
-            backupContext(backup, context);
-            setAsContextDoc(context);
+        String result = this.renderingCache.getRenderedContent(getDocumentReference(), text, context);
 
-            // This tells display() methods that we are inside the rendering engine and thus
-            // that they can return wiki syntax and not HTML syntax (which is needed when
-            // outside the rendering engine, i.e. when we're inside templates using only
-            // Velocity for example).
-            context.put("isInRenderingEngine", true);
+        if (result == null) {
+            Map<String, Object> backup = new HashMap<String, Object>();
+            Object isInRenderingEngine = context.get("isInRenderingEngine");
+            try {
+                backupContext(backup, context);
+                setAsContextDoc(context);
 
-            // If the Syntax id is "xwiki/1.0" then use the old rendering subsystem. Otherwise use the new one.
-            if (is10Syntax(sourceSyntaxId)) {
-                result = context.getWiki().getRenderingEngine().renderText(text, this, context);
-            } else {
-                SyntaxFactory syntaxFactory = Utils.getComponent(SyntaxFactory.class);
-                result =
-                        performSyntaxConversion(text, sourceSyntaxId,
-                            syntaxFactory.createSyntaxFromIdString(targetSyntaxId), true);
-            }
-        } catch (Exception e) {
-            // Failed to render for some reason. This method should normally throw an exception but this
-            // requires changing the signature of calling methods too.
-            LOG.warn(e);
-            result = "";
-        } finally {
-            restoreContext(backup, context);
-            if (isInRenderingEngine != null) {
-                context.put("isInRenderingEngine", isInRenderingEngine);
-            } else {
-                context.remove("isInRenderingEngine");
+                // This tells display() methods that we are inside the rendering engine and thus
+                // that they can return wiki syntax and not HTML syntax (which is needed when
+                // outside the rendering engine, i.e. when we're inside templates using only
+                // Velocity for example).
+                context.put("isInRenderingEngine", true);
+
+                // If the Syntax id is "xwiki/1.0" then use the old rendering subsystem. Otherwise use the new one.
+                if (is10Syntax(sourceSyntaxId)) {
+                    result = context.getWiki().getRenderingEngine().renderText(text, this, context);
+                } else {
+                    SyntaxFactory syntaxFactory = Utils.getComponent(SyntaxFactory.class);
+                    result =
+                        performSyntaxConversion(text, sourceSyntaxId, syntaxFactory
+                            .createSyntaxFromIdString(targetSyntaxId), true);
+                }
+
+                this.renderingCache.setRenderedContent(getDocumentReference(), text, result, context);
+            } catch (Exception e) {
+                // Failed to render for some reason. This method should normally throw an exception but this
+                // requires changing the signature of calling methods too.
+                LOG.warn(e);
+                result = "";
+            } finally {
+                restoreContext(backup, context);
+                if (isInRenderingEngine != null) {
+                    context.put("isInRenderingEngine", isInRenderingEngine);
+                } else {
+                    context.remove("isInRenderingEngine");
+                }
             }
         }
+
         return result;
     }
 
Index: src/main/java/com/xpn/xwiki/internal/RenderingCache.java
===================================================================
--- src/main/java/com/xpn/xwiki/internal/RenderingCache.java	(revision 0)
+++ src/main/java/com/xpn/xwiki/internal/RenderingCache.java	(revision 0)
@@ -0,0 +1,34 @@
+/*
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package com.xpn.xwiki.internal;
+
+import org.xwiki.component.annotation.ComponentRole;
+import org.xwiki.model.reference.DocumentReference;
+
+import com.xpn.xwiki.XWikiContext;
+
+@ComponentRole
+public interface RenderingCache
+{
+    public String getRenderedContent(DocumentReference documentReference, String source, XWikiContext context);
+
+    public void setRenderedContent(DocumentReference documentReference, String source, String renderedContent,
+        XWikiContext context);
+}
Index: src/main/java/com/xpn/xwiki/internal/DefaultRenderingCache.java
===================================================================
--- src/main/java/com/xpn/xwiki/internal/DefaultRenderingCache.java	(revision 0)
+++ src/main/java/com/xpn/xwiki/internal/DefaultRenderingCache.java	(revision 0)
@@ -0,0 +1,95 @@
+/*
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package com.xpn.xwiki.internal;
+
+import org.xwiki.component.annotation.Component;
+import org.xwiki.component.annotation.Requirement;
+import org.xwiki.component.phase.Initializable;
+import org.xwiki.component.phase.InitializationException;
+import org.xwiki.model.reference.DocumentReference;
+
+import com.xpn.xwiki.XWikiContext;
+import com.xpn.xwiki.internal.cache.DocumentCache;
+
+@Component
+public class DefaultRenderingCache implements RenderingCache, Initializable
+{
+    private static final String NAME = "core.renderingcache";
+
+    @Requirement
+    private RenderingCacheConfiguration configuration;
+
+    @Requirement
+    private DocumentCache<String> cache;
+
+    /**
+     * {@inheritDoc}
+     * 
+     * @see org.xwiki.component.phase.Initializable#initialize()
+     */
+    public void initialize() throws InitializationException
+    {
+        if (this.configuration.isEnabled()) {
+            this.cache.initialize(this.configuration.getSize(), this.configuration.getDuration(), NAME);
+        }
+    }
+
+    // cache
+
+    public String getRenderedContent(DocumentReference documentReference, String source, XWikiContext context)
+    {
+        String renderedContent = null;
+
+        if (this.configuration.isCached(documentReference)) {
+            String refresh = context.getRequest() != null ? context.getRequest().getParameter("refresh") : null;
+
+            if (!"1".equals(refresh)) {
+                renderedContent =
+                    this.cache.get(documentReference, source, getAction(context), context.getLanguage(),
+                        getQueryString(context));
+            }
+        }
+
+        return renderedContent;
+    }
+
+    public void setRenderedContent(DocumentReference documentReference, String source, String renderedContent,
+        XWikiContext context)
+    {
+        if (this.configuration.isCached(documentReference)) {
+            this.cache.set(documentReference, renderedContent, source, getAction(context), context.getLanguage(),
+                getQueryString(context));
+        }
+    }
+
+    private String getAction(XWikiContext context)
+    {
+        return context.getAction() != null ? context.getAction() : "view";
+    }
+
+    private String getQueryString(XWikiContext context)
+    {
+        String queryString =
+            context.getRequest() != null && context.getRequest().getQueryString() != null ? context.getRequest()
+                .getQueryString() : "";
+
+        return queryString.replaceAll("\\&?refresh=1", "");
+    }
+}
Index: src/main/java/com/xpn/xwiki/internal/RenderingCacheConfiguration.java
===================================================================
--- src/main/java/com/xpn/xwiki/internal/RenderingCacheConfiguration.java	(revision 0)
+++ src/main/java/com/xpn/xwiki/internal/RenderingCacheConfiguration.java	(revision 0)
@@ -0,0 +1,35 @@
+/*
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package com.xpn.xwiki.internal;
+
+import org.xwiki.component.annotation.ComponentRole;
+import org.xwiki.model.reference.DocumentReference;
+
+@ComponentRole
+public interface RenderingCacheConfiguration
+{
+    boolean isEnabled();
+
+    int getDuration();
+
+    int getSize();
+
+    boolean isCached(DocumentReference documentReference);
+}
Index: src/main/java/com/xpn/xwiki/internal/DefaultRenderingCacheConfiguration.java
===================================================================
--- src/main/java/com/xpn/xwiki/internal/DefaultRenderingCacheConfiguration.java	(revision 0)
+++ src/main/java/com/xpn/xwiki/internal/DefaultRenderingCacheConfiguration.java	(revision 0)
@@ -0,0 +1,106 @@
+/*
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package com.xpn.xwiki.internal;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Pattern;
+
+import org.xwiki.component.annotation.Component;
+import org.xwiki.component.annotation.Requirement;
+import org.xwiki.configuration.ConfigurationSource;
+import org.xwiki.model.reference.DocumentReference;
+import org.xwiki.model.reference.EntityReferenceSerializer;
+
+@Component
+public class DefaultRenderingCacheConfiguration implements RenderingCacheConfiguration
+{
+    private static final String PREFIX = "core.renderingcache.";
+
+    private static final String PROPNAME_ENABLED = PREFIX + "enabled";
+
+    private static final String PROPNAME_DOCUMENTS = PREFIX + "documents";
+
+    private static final String PROPNAME_DURATION = PREFIX + "duration";
+
+    private static final int PROPVALUE_DURATION = 300;
+
+    private static final String PROPNAME_SIZE = PREFIX + "size";
+
+    private static final int PROPVALUE_SIZE = 100;
+
+    /**
+     * Defines from where to read the rendering configuration data.
+     */
+    @Requirement("xwikiproperties")
+    private ConfigurationSource configuration;
+
+    @Requirement
+    private EntityReferenceSerializer<String> serializer;
+
+    private List<Pattern> patternList;
+
+    public boolean isEnabled()
+    {
+        return this.configuration.getProperty(PROPNAME_ENABLED, false);
+    }
+
+    public int getDuration()
+    {
+        return this.configuration.getProperty(PROPNAME_DURATION, PROPVALUE_DURATION);
+    }
+
+    public int getSize()
+    {
+        return this.configuration.getProperty(PROPNAME_SIZE, PROPVALUE_SIZE);
+    }
+
+    public boolean isCached(DocumentReference documentReference)
+    {
+        if (isEnabled()) {
+            String documentReferenceString = this.serializer.serialize(documentReference);
+
+            for (Pattern pattern : getDocuments()) {
+                if (pattern.matcher(documentReferenceString).matches()) {
+                    return true;
+                }
+            }
+        }
+
+        return false;
+    }
+
+    private List<Pattern> getDocuments()
+    {
+        if (this.patternList == null) {
+            List<String> patternStringList = this.configuration.getProperty(PROPNAME_DOCUMENTS, List.class);
+
+            if (patternStringList != null) {
+                this.patternList = new ArrayList<Pattern>(patternStringList.size());
+
+                for (String patternString : patternStringList) {
+                    this.patternList.add(Pattern.compile(patternString));
+                }
+            }
+        }
+
+        return this.patternList;
+    }
+}
Index: src/main/java/com/xpn/xwiki/internal/cache/DefaultDocumentCache.java
===================================================================
--- src/main/java/com/xpn/xwiki/internal/cache/DefaultDocumentCache.java	(revision 0)
+++ src/main/java/com/xpn/xwiki/internal/cache/DefaultDocumentCache.java	(revision 0)
@@ -0,0 +1,202 @@
+/*
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package com.xpn.xwiki.internal.cache;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+
+import org.xwiki.cache.Cache;
+import org.xwiki.cache.CacheException;
+import org.xwiki.cache.CacheManager;
+import org.xwiki.cache.config.CacheConfiguration;
+import org.xwiki.cache.eviction.LRUEvictionConfiguration;
+import org.xwiki.component.annotation.Component;
+import org.xwiki.component.annotation.InstantiationStrategy;
+import org.xwiki.component.annotation.Requirement;
+import org.xwiki.component.descriptor.ComponentInstantiationStrategy;
+import org.xwiki.component.phase.InitializationException;
+import org.xwiki.model.reference.DocumentReference;
+import org.xwiki.model.reference.EntityReferenceSerializer;
+import org.xwiki.observation.EventListener;
+import org.xwiki.observation.ObservationManager;
+import org.xwiki.observation.event.DocumentDeleteEvent;
+import org.xwiki.observation.event.DocumentSaveEvent;
+import org.xwiki.observation.event.DocumentUpdateEvent;
+import org.xwiki.observation.event.Event;
+
+import com.xpn.xwiki.doc.XWikiDocument;
+
+/**
+ * Base class for a component caching document related data. It automatically clean the cache when the document is
+ * related.
+ * <p>
+ * Child class should override {@link #getKey(DocumentReference, Object...)} to support several cache entries for the
+ * same document. For example one for each language.
+ * 
+ * @param <C> the type of the data stored in the cache
+ * @version $Id$
+ */
+@Component
+@InstantiationStrategy(ComponentInstantiationStrategy.PER_LOOKUP)
+public class DefaultDocumentCache<C> implements DocumentCache<C>
+{
+    private static final List<Event> EVENTS =
+        Arrays.<Event> asList(new DocumentSaveEvent(), new DocumentUpdateEvent(), new DocumentDeleteEvent());
+
+    @Requirement
+    private CacheManager cacheManager;
+
+    @Requirement
+    private EntityReferenceSerializer<String> serializer;
+
+    private Cache<C> cache;
+
+    private Cache<Collection<String>> mappingCache;
+
+    private String name;
+
+    @Requirement
+    private ObservationManager observationManager;
+
+    private class Listener implements EventListener
+    {
+        /**
+         * {@inheritDoc}
+         * 
+         * @see org.xwiki.observation.EventListener#getName()
+         */
+        public String getName()
+        {
+            return name;
+        }
+
+        /**
+         * {@inheritDoc}
+         * 
+         * @see org.xwiki.observation.EventListener#getEvents()
+         */
+        public List<Event> getEvents()
+        {
+            return EVENTS;
+        }
+
+        /**
+         * {@inheritDoc}
+         * 
+         * @see org.xwiki.observation.EventListener#onEvent(org.xwiki.observation.event.Event, java.lang.Object,
+         *      java.lang.Object)
+         */
+        public void onEvent(Event event, Object source, Object data)
+        {
+            XWikiDocument document = (XWikiDocument) source;
+
+            String documentReferenceString = serializer.serialize(document.getDocumentReference());
+
+            Collection<String> keys = mappingCache.get(documentReferenceString);
+
+            if (keys != null) {
+                for (String key : keys) {
+                    cache.remove(key);
+                }
+
+                mappingCache.remove(documentReferenceString);
+            }
+        }
+    }
+
+    private Listener listener = new Listener();
+
+    public void initialize(int size, int duration, String name) throws InitializationException
+    {
+        this.name = name;
+
+        try {
+            CacheConfiguration cacheConfiguration = new CacheConfiguration();
+            cacheConfiguration.setConfigurationId(name);
+            LRUEvictionConfiguration lru = new LRUEvictionConfiguration();
+            lru.setMaxEntries(size);
+            lru.setTimeToLive(duration);
+            cacheConfiguration.put(LRUEvictionConfiguration.CONFIGURATIONID, lru);
+
+            this.cache = this.cacheManager.createNewCache(cacheConfiguration);
+
+            CacheConfiguration mappingCacheConfiguration = new CacheConfiguration();
+            mappingCacheConfiguration.setConfigurationId(name + "mapping");
+            LRUEvictionConfiguration mappingLru = new LRUEvictionConfiguration();
+            mappingLru.setMaxEntries(size);
+            mappingLru.setTimeToLive(duration);
+            mappingCacheConfiguration.put(LRUEvictionConfiguration.CONFIGURATIONID, mappingLru);
+
+            this.mappingCache = this.cacheManager.createNewCache(mappingCacheConfiguration);
+        } catch (CacheException e) {
+            throw new InitializationException("Failed to initialize core rendering cache", e);
+        }
+
+        this.observationManager.addListener(this.listener);
+    }
+
+    // cache
+
+    public C get(DocumentReference documentReference, Object... extensions)
+    {
+        return this.cache.get(getKey(documentReference, extensions));
+    }
+
+    public void set(DocumentReference documentReference, C data, Object... extensions)
+    {
+        String key = getKey(documentReference, extensions);
+        this.cache.set(key, data);
+
+        String documentReferenceString = this.serializer.serialize(documentReference);
+
+        Collection<String> keys = this.mappingCache.get(documentReferenceString);
+
+        if (keys == null) {
+            keys = new HashSet<String>();
+            this.mappingCache.set(documentReferenceString, keys);
+        }
+
+        keys.add(key);
+    }
+
+    protected String getKey(DocumentReference documentReference, Object... extensions)
+    {
+        StringBuffer buffer = new StringBuffer();
+
+        if (extensions.length > 0) {
+            buffer.append(escape(this.serializer.serialize(documentReference)));
+            for (Object extension : extensions) {
+                buffer.append(':');
+                buffer.append(escape(extension != null ? extension.toString() : ""));
+            }
+        } else {
+            buffer.append(this.serializer.serialize(documentReference));
+        }
+
+        return buffer.toString();
+    }
+
+    private String escape(String str)
+    {
+        return str.replace("\\", "\\\\").replace(":", "\\:");
+    }
+}
Index: src/main/java/com/xpn/xwiki/internal/cache/DocumentCache.java
===================================================================
--- src/main/java/com/xpn/xwiki/internal/cache/DocumentCache.java	(revision 0)
+++ src/main/java/com/xpn/xwiki/internal/cache/DocumentCache.java	(revision 0)
@@ -0,0 +1,15 @@
+package com.xpn.xwiki.internal.cache;
+
+import org.xwiki.component.annotation.ComponentRole;
+import org.xwiki.component.phase.InitializationException;
+import org.xwiki.model.reference.DocumentReference;
+
+@ComponentRole
+public interface DocumentCache<C>
+{
+    void initialize(int size, int duration, String name) throws InitializationException;
+
+    C get(DocumentReference documentReference, Object... extensions);
+
+    void set(DocumentReference documentReference, C data, Object... extensions);
+}
Index: src/main/resources/META-INF/components.txt
===================================================================
--- src/main/resources/META-INF/components.txt	(revision 28450)
+++ src/main/resources/META-INF/components.txt	(working copy)
@@ -32,4 +32,7 @@
 com.xpn.xwiki.internal.XWikiStubContextInitializer
 com.xpn.xwiki.internal.DefaultXWikiStubContextProvider
 com.xpn.xwiki.internal.observation.remote.converter.DocumentEventConverter
-com.xpn.xwiki.internal.observation.remote.converter.ActionExecutionEventConverter
\ No newline at end of file
+com.xpn.xwiki.internal.observation.remote.converter.ActionExecutionEventConverter
+com.xpn.xwiki.internal.DefaultRenderingCache
+com.xpn.xwiki.internal.DefaultRenderingCacheConfiguration
+com.xpn.xwiki.internal.cache.DefaultDocumentCache
\ No newline at end of file
