开发者

How does standard Wurfl cache - looking into the memory footprint

Just a quick one, can find anything online.

Im looking into using Wurfl for a UserAgent lookup system.

I need some insight into how it caches, now the file comes as one 15.9 meg XML and as I understand it when using APC to cache that it transforms that into an PHP array. However when using the ZIP it creates a directory structure using MD5 hashes as filenames for each individual device (stored as a serialized object).

Now when a request comes in does go away and traverse the cache directories for the rig开发者_如何学编程ht device and then cache that entry only or does it cache the whole filesystem and then lookup on that.

I think I have a pretty good idea of what it does as the alternative sounds counter productive but I'm just looking for confirmation.

Cheers


I've not taken a look at it recently, but I would think that the hashes are based on the User Agent String that gets passed in the headers. The script would hash that, to find the filename, and recover the abilities of a device from the serialised data.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜