code: @Override
      public int size(boolean includeDiskCache) {
          int mappings = 0;
  
          mappings = cache.getNumberCacheEntries();
  
          if (includeDiskCache) {
              if (cache instanceof CacheProviderWrapper) {
                  CacheProviderWrapper cpw = (CacheProviderWrapper) cache;
                  if (cpw.featureSupport.isDiskCacheSupported())
                      mappings = mappings + cache.getIdsSizeDisk();
              } else {
                  mappings = mappings + cache.getIdsSizeDisk();
              }
          }
          return mappings;
      }
docs: Returns number of key-value mappings in this map.
  
  @param includeDiskCache true to get the size of the memory and disk maps; false to get the size of memory map.
  @return the number of key-value mappings in this map.