It caches by date and what you looked at. Why don't you give it a try?
----------
No local storage is required, same as the web version. There's just a lot of BS out there which MR won't debunk (BS = ad impressions). Apple's FAQ is
very clear about this, but sadly people here don't read it because they prefer ignorance. Here's the quote for those who can't Google for themselves-
"If you turn on Optimize [device] Storage, iCloud Photo Library will automatically
manage the size of your library on your iOS device, so you can make the most of your device's storage and access
more photos than ever. iCloud Photo Library stores the original, high-resolution photos and videos in iCloud and can keep lightweight, device-optimized versions on each of your devices.
As long as you have enough storage, recent photos and videos that you access the most will stay on your device at full resolution."
The more photos than ever part is key- the geniuses here who'd rather manage their own local storage will always have to leave a buffer of free space in case they need to install an app or update in a hurry. iCloud Photos is free to use as much storage as it wants, because it can seamlessly delete things on the fly.