Removed caching for DrupalCacheArray variables since it was crashing the AWS SDK.
Commented out the other cache flush which used expire as a variable. This will get sorted next.
Dealt with the 25 item limit by actually getting rid of them from the array rather than... not, as before.