public void putObject(String key, Object value) {
        if (null == value)
            value = NULL_OBJECT;
        synchronized (this) {
            if (serialize && !readOnly && value != NULL_OBJECT) {
                try {
                    ByteArrayOutputStream bos = new ByteArrayOutputStream();
                    ObjectOutputStream oos = new ObjectOutputStream(bos);
                    oos.writeObject(value);
                    oos.flush();
                    oos.close();
                    value = bos.toByteArray();
                } catch (IOException e) {
                    throw new RuntimeException("Error caching serializable object.  Cause: " + e, e);
                }
            }
            controller.putObject(key, value);
        }
    }