1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package com.xpn.xwiki.store

File XWikiCacheStore.java

 

Coverage histogram

../../../../img/srcFileCovDistChart7.png
64% of files have more coverage

Code metrics

18
142
71
1
685
511
83
0.58
2
71
1.17

Classes

Class Line # Actions
XWikiCacheStore 57 142 0% 83 78
0.6623376666.2%
 

Contributing tests

This file is covered by 11 tests. .

Source view

1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19    */
20    package com.xpn.xwiki.store;
21   
22    import java.util.Arrays;
23    import java.util.List;
24   
25    import org.slf4j.Logger;
26    import org.slf4j.LoggerFactory;
27    import org.xwiki.bridge.event.DocumentCreatedEvent;
28    import org.xwiki.bridge.event.DocumentDeletedEvent;
29    import org.xwiki.bridge.event.DocumentUpdatedEvent;
30    import org.xwiki.bridge.event.WikiDeletedEvent;
31    import org.xwiki.cache.Cache;
32    import org.xwiki.cache.CacheException;
33    import org.xwiki.cache.CacheManager;
34    import org.xwiki.cache.config.LRUCacheConfiguration;
35    import org.xwiki.model.reference.DocumentReference;
36    import org.xwiki.model.reference.EntityReferenceSerializer;
37    import org.xwiki.observation.EventListener;
38    import org.xwiki.observation.ObservationManager;
39    import org.xwiki.observation.event.Event;
40    import org.xwiki.observation.remote.RemoteObservationManagerContext;
41    import org.xwiki.query.QueryManager;
42   
43    import com.xpn.xwiki.XWikiContext;
44    import com.xpn.xwiki.XWikiException;
45    import com.xpn.xwiki.doc.XWikiDocument;
46    import com.xpn.xwiki.doc.XWikiLink;
47    import com.xpn.xwiki.doc.XWikiLock;
48    import com.xpn.xwiki.objects.classes.BaseClass;
49    import com.xpn.xwiki.web.Utils;
50   
51    /**
52    * A proxy store implementation that caches Documents when they are first fetched and subsequently return them from a
53    * cache. It delegates all write and search operations to an underlying store without doing any caching on them.
54    *
55    * @version $Id: 0710b5a26e6f5b15470bbe38b0ed0bc7fd21642f $
56    */
 
57    public class XWikiCacheStore implements XWikiCacheStoreInterface, EventListener
58    {
59    private static final Logger LOGGER = LoggerFactory.getLogger(XWikiCacheStore.class);
60   
61    private XWikiStoreInterface store;
62   
63    private Cache<XWikiDocument> cache;
64   
65    private Cache<Boolean> pageExistCache;
66   
67    /**
68    * Used to know if a received event is a local or remote one.
69    */
70    private RemoteObservationManagerContext remoteObservationManagerContext;
71   
72    private EntityReferenceSerializer<String> uidStringEntityReferenceSerializer;
73   
74    /**
75    * Used to register XWikiCacheStore to receive documents events.
76    */
77    private ObservationManager observationManager;
78   
 
79  88 toggle public XWikiCacheStore(XWikiStoreInterface store, XWikiContext context) throws XWikiException
80    {
81  88 setStore(store);
82  88 initCache(context);
83   
84    // register XWikiCacheStore as listener to remote document events
85  88 this.remoteObservationManagerContext = Utils.getComponent(RemoteObservationManagerContext.class);
86  88 this.observationManager = Utils.getComponent(ObservationManager.class);
87  88 this.observationManager.addListener(this);
88  88 this.uidStringEntityReferenceSerializer = Utils.getComponent(EntityReferenceSerializer.TYPE_STRING, "uid");
89    }
90   
 
91  870 toggle @Override
92    public String getName()
93    {
94  870 return "XWikiCacheStore";
95    }
96   
 
97  87 toggle @Override
98    public List<Event> getEvents()
99    {
100  87 return Arrays.<Event>asList(new DocumentCreatedEvent(), new DocumentUpdatedEvent(), new DocumentDeletedEvent(),
101    new WikiDeletedEvent());
102    }
103   
 
104  88 toggle public void initCache(XWikiContext context) throws XWikiException
105    {
106  88 CacheManager cacheManager = Utils.getComponent(CacheManager.class);
107   
108  88 try {
109  88 int pageCacheCapacity = (int) context.getWiki().ParamAsLong("xwiki.store.cache.capacity", 500);
110  88 this.cache =
111    cacheManager.createNewCache(new LRUCacheConfiguration("xwiki.store.pagecache", pageCacheCapacity));
112   
113  88 int pageExistCacheCapacity =
114    (int) context.getWiki().ParamAsLong("xwiki.store.cache.pageexistcapacity", 10000);
115  88 this.pageExistCache = cacheManager
116    .createNewCache(new LRUCacheConfiguration("xwiki.store.pageexistcache", pageExistCacheCapacity));
117    } catch (CacheException e) {
118  0 throw new XWikiException(XWikiException.MODULE_XWIKI_CACHE, XWikiException.ERROR_CACHE_INITIALIZING,
119    "Failed to initialize cache", e);
120    }
121    }
122   
 
123  0 toggle @Deprecated
124    @Override
125    public void initCache(int capacity, int pageExistCacheCapacity, XWikiContext context) throws XWikiException
126    {
127    // Do nothing
128    }
129   
 
130  11680 toggle @Override
131    public XWikiStoreInterface getStore()
132    {
133  11683 return this.store;
134    }
135   
 
136  88 toggle @Override
137    public void setStore(XWikiStoreInterface store)
138    {
139  88 this.store = store;
140    }
141   
 
142  3805 toggle @Override
143    public void saveXWikiDoc(XWikiDocument doc, XWikiContext context) throws XWikiException
144    {
145  3805 saveXWikiDoc(doc, context, true);
146    }
147   
 
148  3805 toggle @Override
149    public void saveXWikiDoc(XWikiDocument doc, XWikiContext context, boolean bTransaction) throws XWikiException
150    {
151  3805 this.store.saveXWikiDoc(doc, context, bTransaction);
152   
153  3805 doc.setStore(this.store);
154   
155    // We need to flush so that caches
156    // on the cluster are informed about the change
157  3805 String key = getKey(doc, context);
158  3805 getCache().remove(key);
159  3805 getPageExistCache().remove(key);
160   
161    /*
162    * We do not want to save the document in the cache at this time. If we did, this would introduce the
163    * possibility for cache incoherence if the document is not saved in the database properly. In addition, the
164    * attachments uploaded to the document stay with it so we want the document in it's current form to be garbage
165    * collected as soon as the request is complete.
166    */
167    }
168   
 
169  3 toggle @Override
170    public void flushCache()
171    {
172  3 getCache().removeAll();
173  3 getPageExistCache().removeAll();
174    }
175   
 
176  4039 toggle @Override
177    public void onEvent(Event event, Object source, Object data)
178    {
179    // only react to remote events since local actions are already taken into account
180  4039 if (this.remoteObservationManagerContext.isRemoteState()) {
181  8 if (event instanceof WikiDeletedEvent) {
182  0 flushCache();
183    } else {
184  8 XWikiDocument doc = (XWikiDocument) source;
185   
186  8 String key = doc.getKey();
187   
188  8 if (getCache() != null) {
189  8 getCache().remove(key);
190    }
191  8 if (getPageExistCache() != null) {
192  8 getPageExistCache().remove(key);
193    }
194    }
195    }
196    }
197   
198    /**
199    * @deprecated since 4.0M1, use {@link com.xpn.xwiki.doc.XWikiDocument#getKey()}
200    */
 
201  0 toggle @Deprecated
202    public String getKey(XWikiDocument doc)
203    {
204  0 return doc.getKey();
205    }
206   
 
207  644385 toggle public String getKey(XWikiDocument doc, XWikiContext context)
208    {
209  644360 DocumentReference reference = doc.getDocumentReferenceWithLocale();
210   
211    // The current wiki might be different from the reference wiki so fix it before calculating the key
212  644355 if (!reference.getWikiReference().equals(context.getWikiReference())) {
213  2 reference = reference.setWikiReference(context.getWikiReference());
214    }
215   
216    // Calculate the cache key
217  644349 return this.uidStringEntityReferenceSerializer.serialize(reference, reference);
218    }
219   
220    /**
221    * @deprecated since 4.0M1, use {@link com.xpn.xwiki.doc.XWikiDocument#getKey()}
222    */
 
223  0 toggle @Deprecated
224    public String getKey(String fullName, String language, XWikiContext context)
225    {
226  0 XWikiDocument doc = new XWikiDocument(null, fullName);
227  0 doc.setLanguage(language);
228   
229  0 return getKey(doc, context);
230    }
231   
232    /**
233    * @deprecated since 4.0M1, use {@link com.xpn.xwiki.doc.XWikiDocument#getKey()}
234    */
 
235  0 toggle @Deprecated
236    public String getKey(final String wiki, final String fullName, final String language)
237    {
238  0 XWikiDocument doc = new XWikiDocument(wiki, null, fullName);
239  0 doc.setLanguage(language);
240   
241  0 return getKey(doc);
242    }
243   
 
244  585722 toggle @Override
245    public XWikiDocument loadXWikiDoc(XWikiDocument doc, XWikiContext context) throws XWikiException
246    {
247    // Calculate the cache key
248  585701 String key = getKey(doc, context);
249   
250  585688 LOGGER.debug("Cache: Trying to get doc {} from cache", key);
251   
252  585681 XWikiDocument cachedoc;
253  585687 try {
254  585661 cachedoc = getCache().get(key);
255    } catch (Exception e) {
256  0 LOGGER.error("Failed to get document from the cache", e);
257   
258  0 cachedoc = null;
259    }
260   
261  585687 if (cachedoc != null) {
262  147992 cachedoc.setFromCache(true);
263   
264  147990 LOGGER.debug("Cache: got doc {} from cache", key);
265    } else {
266  437691 Boolean result = getPageExistCache().get(key);
267   
268  437734 if (result == Boolean.FALSE) {
269  426660 LOGGER.debug("Cache: The document {} does not exist, return an empty one", key);
270   
271  426661 cachedoc = doc;
272  426664 cachedoc.setNew(true);
273   
274    // Make sure to always return a document with an original version, even for one that does not exist.
275    // Allow writing more generic code.
276  426656 cachedoc.setOriginalDocument(new XWikiDocument(cachedoc.getDocumentReference(), cachedoc.getLocale()));
277    } else {
278  11062 LOGGER.debug("Cache: Trying to get doc {} from persistent storage", key);
279   
280  11063 cachedoc = this.store.loadXWikiDoc(doc, context);
281   
282  11059 LOGGER.debug("Cache: Got doc {} from storage", key);
283   
284  11059 if (cachedoc.isNew()) {
285  7458 getPageExistCache().set(key, Boolean.FALSE);
286    } else {
287  3603 getCache().set(key, cachedoc);
288   
289    // Also update exist cache
290  3603 getPageExistCache().set(key, Boolean.TRUE);
291    }
292   
293  11068 LOGGER.debug("Cache: put doc {} in cache", key);
294    }
295   
296  437729 cachedoc.setStore(this.store);
297    }
298   
299  585710 LOGGER.debug("Cache: end for doc {} in cache", key);
300   
301  585708 return cachedoc;
302    }
303   
 
304  153 toggle @Override
305    public void deleteXWikiDoc(XWikiDocument doc, XWikiContext context) throws XWikiException
306    {
307    // Calculate the cache key
308  153 String key = getKey(doc, context);
309   
310  153 this.store.deleteXWikiDoc(doc, context);
311   
312  153 getCache().remove(key);
313  153 getPageExistCache().remove(key);
314  153 getPageExistCache().set(key, Boolean.FALSE);
315    }
316   
 
317  28 toggle @Override
318    public List<String> getClassList(XWikiContext context) throws XWikiException
319    {
320  28 return this.store.getClassList(context);
321    }
322   
 
323  0 toggle @Override
324    public int countDocuments(String wheresql, XWikiContext context) throws XWikiException
325    {
326  0 return this.store.countDocuments(wheresql, context);
327    }
328   
 
329  78 toggle @Override
330    public List<DocumentReference> searchDocumentReferences(String wheresql, XWikiContext context) throws XWikiException
331    {
332  78 return this.store.searchDocumentReferences(wheresql, context);
333    }
334   
 
335  0 toggle @Override
336    public List<String> searchDocumentsNames(String wheresql, XWikiContext context) throws XWikiException
337    {
338  0 return this.store.searchDocumentsNames(wheresql, context);
339    }
340   
 
341  0 toggle @Override
342    public List<DocumentReference> searchDocumentReferences(String wheresql, int nb, int start, XWikiContext context)
343    throws XWikiException
344    {
345  0 return this.store.searchDocumentReferences(wheresql, nb, start, context);
346    }
347   
 
348  14 toggle @Override
349    public List<String> searchDocumentsNames(String wheresql, int nb, int start, XWikiContext context)
350    throws XWikiException
351    {
352  14 return this.store.searchDocumentsNames(wheresql, nb, start, context);
353    }
354   
 
355  0 toggle @Override
356    public List<DocumentReference> searchDocumentReferences(String wheresql, int nb, int start, String selectColumns,
357    XWikiContext context) throws XWikiException
358    {
359  0 return this.store.searchDocumentReferences(wheresql, nb, start, selectColumns, context);
360    }
361   
 
362  0 toggle @Override
363    public List<String> searchDocumentsNames(String wheresql, int nb, int start, String selectColumns,
364    XWikiContext context) throws XWikiException
365    {
366  0 return this.store.searchDocumentsNames(wheresql, nb, start, selectColumns, context);
367    }
368   
 
369  0 toggle @Override
370    public List<DocumentReference> searchDocumentReferences(String parametrizedSqlClause, int nb, int start,
371    List<?> parameterValues, XWikiContext context) throws XWikiException
372    {
373  0 return this.store.searchDocumentReferences(parametrizedSqlClause, nb, start, parameterValues, context);
374    }
375   
 
376  2 toggle @Override
377    public List<String> searchDocumentsNames(String parametrizedSqlClause, int nb, int start, List<?> parameterValues,
378    XWikiContext context) throws XWikiException
379    {
380  2 return this.store.searchDocumentsNames(parametrizedSqlClause, nb, start, parameterValues, context);
381    }
382   
 
383  7823 toggle @Override
384    public List<DocumentReference> searchDocumentReferences(String parametrizedSqlClause, List<?> parameterValues,
385    XWikiContext context) throws XWikiException
386    {
387  7823 return this.store.searchDocumentReferences(parametrizedSqlClause, parameterValues, context);
388    }
389   
 
390  0 toggle @Override
391    public List<String> searchDocumentsNames(String parametrizedSqlClause, List<?> parameterValues,
392    XWikiContext context) throws XWikiException
393    {
394  0 return this.store.searchDocumentsNames(parametrizedSqlClause, parameterValues, context);
395    }
396   
 
397  0 toggle @Override
398    public boolean isCustomMappingValid(BaseClass bclass, String custommapping1, XWikiContext context)
399    throws XWikiException
400    {
401  0 return this.store.isCustomMappingValid(bclass, custommapping1, context);
402    }
403   
 
404  1967 toggle @Override
405    public boolean injectCustomMapping(BaseClass doc1class, XWikiContext context) throws XWikiException
406    {
407  1967 return this.store.injectCustomMapping(doc1class, context);
408    }
409   
 
410  0 toggle @Override
411    public boolean injectCustomMappings(XWikiDocument doc, XWikiContext context) throws XWikiException
412    {
413  0 return this.store.injectCustomMappings(doc, context);
414    }
415   
 
416  0 toggle @Override
417    public List<XWikiDocument> searchDocuments(String wheresql, boolean distinctbyname, XWikiContext context)
418    throws XWikiException
419    {
420  0 return this.store.searchDocuments(wheresql, distinctbyname, context);
421    }
422   
 
423  0 toggle @Override
424    public List<XWikiDocument> searchDocuments(String wheresql, boolean distinctbyname, boolean customMapping,
425    XWikiContext context) throws XWikiException
426    {
427  0 return this.store.searchDocuments(wheresql, distinctbyname, customMapping, context);
428    }
429   
 
430  0 toggle @Override
431    public List<XWikiDocument> searchDocuments(String wheresql, boolean distinctbyname, int nb, int start,
432    XWikiContext context) throws XWikiException
433    {
434  0 return this.store.searchDocuments(wheresql, distinctbyname, nb, start, context);
435    }
436   
 
437  0 toggle @Override
438    public List<XWikiDocument> searchDocuments(String wheresql, boolean distinctbyname, boolean customMapping, int nb,
439    int start, XWikiContext context) throws XWikiException
440    {
441  0 return this.store.searchDocuments(wheresql, distinctbyname, customMapping, nb, start, context);
442    }
443   
 
444  0 toggle @Override
445    public List<XWikiDocument> searchDocuments(String wheresql, XWikiContext context) throws XWikiException
446    {
447  0 return this.store.searchDocuments(wheresql, context);
448    }
449   
 
450  0 toggle @Override
451    public List<XWikiDocument> searchDocuments(String wheresql, int nb, int start, XWikiContext context)
452    throws XWikiException
453    {
454  0 return this.store.searchDocuments(wheresql, nb, start, context);
455    }
456   
 
457  0 toggle @Override
458    public List<XWikiDocument> searchDocuments(String wheresql, boolean distinctbyname, boolean customMapping,
459    boolean checkRight, int nb, int start, XWikiContext context) throws XWikiException
460    {
461  0 return this.store.searchDocuments(wheresql, distinctbyname, customMapping, checkRight, nb, start, context);
462    }
463   
 
464  5 toggle @Override
465    public List<XWikiDocument> searchDocuments(String wheresql, boolean distinctbylanguage, int nb, int start,
466    List<?> parameterValues, XWikiContext context) throws XWikiException
467    {
468  5 return this.store.searchDocuments(wheresql, distinctbylanguage, nb, start, parameterValues, context);
469    }
470   
 
471  0 toggle @Override
472    public List<XWikiDocument> searchDocuments(String wheresql, List<?> parameterValues, XWikiContext context)
473    throws XWikiException
474    {
475  0 return this.store.searchDocuments(wheresql, parameterValues, context);
476    }
477   
 
478  0 toggle @Override
479    public List<XWikiDocument> searchDocuments(String wheresql, boolean distinctbylanguage, boolean customMapping,
480    int nb, int start, List<?> parameterValues, XWikiContext context) throws XWikiException
481    {
482  0 return this.store.searchDocuments(wheresql, distinctbylanguage, customMapping, nb, start, parameterValues,
483    context);
484    }
485   
 
486  0 toggle @Override
487    public List<XWikiDocument> searchDocuments(String wheresql, int nb, int start, List<?> parameterValues,
488    XWikiContext context) throws XWikiException
489    {
490  0 return this.store.searchDocuments(wheresql, nb, start, parameterValues, context);
491    }
492   
 
493  0 toggle @Override
494    public List<XWikiDocument> searchDocuments(String wheresql, boolean distinctbylanguage, boolean customMapping,
495    boolean checkRight, int nb, int start, List<?> parameterValues, XWikiContext context) throws XWikiException
496    {
497  0 return this.store.searchDocuments(wheresql, distinctbylanguage, customMapping, checkRight, nb, start,
498    parameterValues, context);
499    }
500   
 
501  0 toggle @Override
502    public int countDocuments(String parametrizedSqlClause, List<?> parameterValues, XWikiContext context)
503    throws XWikiException
504    {
505  0 return this.store.countDocuments(parametrizedSqlClause, parameterValues, context);
506    }
507   
 
508  1794 toggle @Override
509    public XWikiLock loadLock(long docId, XWikiContext context, boolean bTransaction) throws XWikiException
510    {
511  1794 return this.store.loadLock(docId, context, bTransaction);
512    }
513   
 
514  559 toggle @Override
515    public void saveLock(XWikiLock lock, XWikiContext context, boolean bTransaction) throws XWikiException
516    {
517  561 this.store.saveLock(lock, context, bTransaction);
518    }
519   
 
520  263 toggle @Override
521    public void deleteLock(XWikiLock lock, XWikiContext context, boolean bTransaction) throws XWikiException
522    {
523  263 this.store.deleteLock(lock, context, bTransaction);
524    }
525   
 
526  3 toggle @Override
527    public List<XWikiLink> loadLinks(long docId, XWikiContext context, boolean bTransaction) throws XWikiException
528    {
529  3 return this.store.loadLinks(docId, context, bTransaction);
530    }
531   
 
532  5 toggle @Override
533    public List<DocumentReference> loadBacklinks(DocumentReference documentReference, boolean bTransaction,
534    XWikiContext context) throws XWikiException
535    {
536  5 return this.store.loadBacklinks(documentReference, bTransaction, context);
537    }
538   
 
539  14 toggle @Override
540    public List<String> loadBacklinks(String fullName, XWikiContext context, boolean bTransaction) throws XWikiException
541    {
542  14 return this.store.loadBacklinks(fullName, context, bTransaction);
543    }
544   
 
545  0 toggle @Override
546    public void saveLinks(XWikiDocument doc, XWikiContext context, boolean bTransaction) throws XWikiException
547    {
548  0 this.store.saveLinks(doc, context, bTransaction);
549    }
550   
 
551  0 toggle @Override
552    public void deleteLinks(long docId, XWikiContext context, boolean bTransaction) throws XWikiException
553    {
554  0 this.store.deleteLinks(docId, context, bTransaction);
555    }
556   
 
557  0 toggle @Override
558    public <T> List<T> search(String sql, int nb, int start, XWikiContext context) throws XWikiException
559    {
560  0 return this.store.search(sql, nb, start, context);
561    }
562   
 
563  1 toggle @Override
564    public <T> List<T> search(String sql, int nb, int start, Object[][] whereParams, XWikiContext context)
565    throws XWikiException
566    {
567  1 return this.store.search(sql, nb, start, whereParams, context);
568    }
569   
 
570  120 toggle @Override
571    public <T> List<T> search(String sql, int nb, int start, List<?> parameterValues, XWikiContext context)
572    throws XWikiException
573    {
574  120 return this.store.search(sql, nb, start, parameterValues, context);
575    }
576   
 
577  0 toggle @Override
578    public <T> List<T> search(String sql, int nb, int start, Object[][] whereParams, List<?> parameterValues,
579    XWikiContext context) throws XWikiException
580    {
581  0 return this.store.search(sql, nb, start, whereParams, parameterValues, context);
582    }
583   
 
584  9620 toggle @Override
585    public synchronized void cleanUp(XWikiContext context)
586    {
587  9620 this.store.cleanUp(context);
588    }
589   
 
590  35 toggle @Override
591    public boolean isWikiNameAvailable(String wikiName, XWikiContext context) throws XWikiException
592    {
593  35 synchronized (wikiName) {
594  35 return this.store.isWikiNameAvailable(wikiName, context);
595    }
596    }
597   
 
598  4 toggle @Override
599    public void createWiki(String wikiName, XWikiContext context) throws XWikiException
600    {
601  4 synchronized (wikiName) {
602  4 this.store.createWiki(wikiName, context);
603    }
604    }
605   
 
606  3 toggle @Override
607    public void deleteWiki(String wikiName, XWikiContext context) throws XWikiException
608    {
609  3 synchronized (wikiName) {
610  3 this.store.deleteWiki(wikiName, context);
611  3 flushCache();
612    }
613    }
614   
 
615  54723 toggle @Override
616    public boolean exists(XWikiDocument doc, XWikiContext context) throws XWikiException
617    {
618    // Calculate the cache key
619  54718 String key = getKey(doc, context);
620   
621  54723 try {
622  54723 Boolean result = getPageExistCache().get(key);
623   
624  54722 if (result != null) {
625  53339 return result;
626    }
627    } catch (Exception e) {
628    }
629   
630  1383 boolean result = this.store.exists(doc, context);
631  1383 getPageExistCache().set(key, Boolean.valueOf(result));
632   
633  1383 return result;
634    }
635   
 
636  593274 toggle public Cache<XWikiDocument> getCache()
637    {
638  593258 return this.cache;
639    }
640   
 
641  0 toggle public void setCache(Cache<XWikiDocument> cache)
642    {
643  0 this.cache = cache;
644    }
645   
 
646  508985 toggle public Cache<Boolean> getPageExistCache()
647    {
648  508978 return this.pageExistCache;
649    }
650   
 
651  0 toggle public void setPageExistCache(Cache<Boolean> pageExistCache)
652    {
653  0 this.pageExistCache = pageExistCache;
654    }
655   
 
656  78 toggle @Override
657    public List<String> getCustomMappingPropertyList(BaseClass bclass)
658    {
659  78 return this.store.getCustomMappingPropertyList(bclass);
660    }
661   
 
662  0 toggle @Override
663    public synchronized void injectCustomMappings(XWikiContext context) throws XWikiException
664    {
665  0 this.store.injectCustomMappings(context);
666    }
667   
 
668  0 toggle @Override
669    public void injectUpdatedCustomMappings(XWikiContext context) throws XWikiException
670    {
671  0 this.store.injectUpdatedCustomMappings(context);
672    }
673   
 
674  0 toggle @Override
675    public List<String> getTranslationList(XWikiDocument doc, XWikiContext context) throws XWikiException
676    {
677  0 return this.store.getTranslationList(doc, context);
678    }
679   
 
680  351 toggle @Override
681    public QueryManager getQueryManager()
682    {
683  351 return getStore().getQueryManager();
684    }
685    }