[Lemon] Zero-initialize caches and such.
[Lemon] Check if cache is available and has been alloc'd.

Fixes segfault if it's not.