src/main/java/com/github/mrcritical/ironcache/DefaultIronCacheProvider.java
@Override
	public void putItem(final String name, final CacheItemRequest request) {
		try {
			validate(request);
			final CacheRequest item = new CacheRequest().value(request.getValue()).cas(request.getCas())
					.expires(request.getExpireAfter());
			// .replace(request.getOnlyIfExists())
			// .add(request.getOnlyIfNotExists());

			final CacheResponse response = objectMapper.readValue(
					requestFactory
							.buildPutRequest(new CacheItemUrl(hostName, projectId, name, request.getKey()),
									new JsonHttpContent(JSON_FACTORY, item)).execute().getContent(),
					CacheResponse.class);

			validate(response, "stored");

			log.debug("Successful request to add item {} with value {} to the cache {}", request.getKey(),
					request.getValue(), name);

		} catch (final Exception e) {
			throw Throwables.propagate(e);
		}
	}
@Override
	public void putItem(final String name, final CacheItemRequest request) {
		try {
			validate(request);
			final CacheRequest item = new CacheRequest().value(request.getValue()).cas(request.getCas())
					.expires(request.getExpireAfter());
			// .replace(request.getOnlyIfExists())
			// .add(request.getOnlyIfNotExists());

			final CacheResponse response = objectMapper.readValue(
					requestFactory
							.buildPutRequest(new CacheItemUrl(hostName, projectId, name, request.getKey()),
									new JsonHttpContent(JSON_FACTORY, item)).execute().getContent(),
					CacheResponse.class);

			validate(response, "stored");

			log.debug("Successful request to add item {} with value {} to the cache {}", request.getKey(),
					request.getValue(), name);

		} catch (final Exception e) {
			throw Throwables.propagate(e);
		}
	}
@ Override public void putItem ( final String name , final CacheItemRequest request ) { try { validate ( request ) ; final CacheRequest item = new CacheRequest ( ) . value ( request . getValue ( ) ) . cas ( request . getCas ( ) ) . expires ( request . getExpireAfter ( ) ) ; // .replace(request.getOnlyIfExists()) // .add(request.getOnlyIfNotExists()); final CacheResponse response = objectMapper . readValue ( requestFactory . buildPutRequest ( new CacheItemUrl ( hostName , projectId , name , request . getKey ( ) ) , new JsonHttpContent ( JSON_FACTORY , item ) ) . execute ( ) . getContent ( ) , CacheResponse . class ) ; validate ( response , "stored" ) ; log . debug ( "Successful request to add item {} with value {} to the cache {}" , request . getKey ( ) , request . getValue ( ) , name ) ; } catch ( final Exception e ) { throw Throwables . propagate ( e ) ; } }
/*
(non-Javadoc)

@see
com.github.mrcritical.ironcache.SimpleIronCache#putItem(java.lang.String,
com.github.mrcritical.ironcache.model.CacheItemRequest)
/ * ( non - Javadoc )