Repository navigation
4.1.0
Added
- When working with huge datasets (tens of thousands of resources), for instance with custom CLI commands, the default resource pool may have caused the application to use too much memory and crash. Now there are two different resource pools:
Contentful\Delivery\ResourcePool\Standard, which is a lightweight implemention and only caches space, environment and content types, andContentful\Delivery\ResourcePool\Extended, which also keeps a reference to entries and assets. The latter class was known asContentful\Delivery\ResourcePool, which has now been deprecated and will be removed in version 5.0. TheExtendedclass is the default one, as it is designed to work with regular PHP requests. In order to use theStandardpool, you must enable it through theClienOptionsclass:As this resource pool provides no caching (and$options = ClientOptions::create() ->withLowMemoryResourcePool(); $client = new Client($token, $spaceId, $environmentId, $options);
includevalues are now skipped, for this reason), it might cause the SDK to make more API calls, so its used is discouraged for regular web applications.