caching sum of langs and keys