PHP caching example

For any number N, we'll find the largest prime number
less than or equal to N. Because our implementation is incredibly basic, we
don't accept N greater than 10,000. When you submit the form, we'll check the
cache to see if we've calculated the largest prime for N. If we get a hit,
we'll return the results from the cache. If not, we'll do the calculation.