Set cache as a weak map

Currently the values of the cache are not being cleared despite
assigning it an empty map. The reason is that variable cfkey_cache is
assigned an upvalue not a reference to the cache.

Setting the cache as a weak map forces to be cleared everytime there's a
garbage-collection cycle.