duckduckgo/p5-app-duckpan — pull request #32 by moollaza (2013-10-10 21:21:47+00:00)
Title: Introduce caching for page assets (js/css)

cc/ @nospampleasemam @yegg @russellholt

In light of https://dub.duckduckgo.com/core/ddg/pull/252#issuecomment-796
I've re-written a portion of Web.pm to now request the SERP from DDG, then find the latest version for `d####.js`, `s.###css` and `spice2_duckpan_###.js`

If the file already exists in Duckpan's local cache, it won't request the file, otherwise it will get the newest one.

Please give feedback on my implementation -- there's room for improvement but for now this works and is a much safer way of getting the required assets.