wp-includes/ai-client/adapters/class-wp-ai-client-cache.php:208Converts a PSR-16 TTL value to seconds for WordPress cache functions.
$ttlnull|int|DateIntervalint private function ttl_to_seconds( $ttl ): int { if ( null === $ttl ) { return 0; } if ( $ttl instanceof DateInterval ) { $now = new DateTime(); $end = ( clone $now )->add( $ttl ); return $end->getTimestamp() - $now->getTimestamp(); } return max( 0, (int) $ttl ); }Introduced in 7.0.0. Unchanged from 7.0.4 through 7.1.0.
Signature, return type and hooks compared across 2 parsed releases.
src/wp-includes/ai-client/adapters/class-wp-ai-client-cache.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.