code: @Override
      public long getCacheValueSize() {
          long valuesize = -1;
          if (this.value != null) {
              Object localValue = this.value;
              valuesize = ObjectSizer.getSize(localValue);
          } else {
              if (this.serializedValue != null) {
                  byte[] localSerializedValue = this.serializedValue;
                  valuesize = ObjectSizer.getSize(localSerializedValue);
              }
          }
  
          // System.out.println("Returning cacheValueSize = " + valuesize);
          return valuesize;
      }
docs: Computes the best-effort size of the cache entry's value. Returns -1 if
  value could not be computed.