src/main/java/com/github/mrcritical/ironcache/DefaultIronCacheProvider.java
private void validate(final CacheItemRequest request) {
		Preconditions.checkArgument(!Strings.isNullOrEmpty(request.getKey()), "A valid key must be supplied");
		Preconditions.checkArgument(null != request.getValue(),
				"A valid value must be supplied, it maybe an empty string");
		Preconditions.checkArgument(!(null != request.getOnlyIfExists() && null != request.getOnlyIfNotExists()),
				"Cannot specify both Only If Exists and Only If Not Exists. The two conditions negate each other.");
		Preconditions.checkArgument(
				null == request.getExpireAfter() || null != request.getExpireAfter() && request.getExpireAfter() > 0,
				"An expiration value must be greater then 0");
	}
private void validate(final CacheItemRequest request) {
		Preconditions.checkArgument(!Strings.isNullOrEmpty(request.getKey()), "A valid key must be supplied");
		Preconditions.checkArgument(null != request.getValue(),
				"A valid value must be supplied, it maybe an empty string");
		Preconditions.checkArgument(!(null != request.getOnlyIfExists() && null != request.getOnlyIfNotExists()),
				"Cannot specify both Only If Exists and Only If Not Exists. The two conditions negate each other.");
		Preconditions.checkArgument(
				null == request.getExpireAfter() || null != request.getExpireAfter() && request.getExpireAfter() > 0,
				"An expiration value must be greater then 0");
	}
private void validate ( final CacheItemRequest request ) { Preconditions . checkArgument ( ! Strings . isNullOrEmpty ( request . getKey ( ) ) , "A valid key must be supplied" ) ; Preconditions . checkArgument ( null != request . getValue ( ) , "A valid value must be supplied, it maybe an empty string" ) ; Preconditions . checkArgument ( ! ( null != request . getOnlyIfExists ( ) && null != request . getOnlyIfNotExists ( ) ) , "Cannot specify both Only If Exists and Only If Not Exists. The two conditions negate each other." ) ; Preconditions . checkArgument ( null == request . getExpireAfter ( ) || null != request . getExpireAfter ( ) && request . getExpireAfter ( ) > 0 , "An expiration value must be greater then 0" ) ; }
Validates that the request being made is going to end up in a valid
request when processed on the server. This includes:

<ul>
<li>Verifying that a key was provided that is not blank</li>
<li>Verifying that a NON-NULL value was provided</li>
<li>That {@link CacheItemRequest#getOnlyIfExists()} and
{@link CacheItemRequest#getOnlyIfNotExists()} are not both set (that
negate each other)</li>
<li>Verifying that any expiration provided is greater then 0</li>
</ul>

@param request
is the request to validate
Validates that the request being made is going to end up in a valid request when processed on the server . This includes :