thephpleague/flysystem — pull request #67 by judgej (2014-02-09 01:23:28+00:00)
Title: A file of size zero never gets its metadata cached.

One thing I cannot get my head around, is cache->getSize($path) will return the size of a file for the path, while adapter->getSize($path) will return the full metadata array for the file path.

I discovered the above non-caching issue because my adapter->getSize() was returning an integer (i.e. the file size) instead of the metadata array, and that let to an error it it tried to cache the integer over the top of the object metadata for the path.

Is there a reason for these two methods acting so wildly different?