If the implementations made in #12 and #14 are too slow, because of too many db queries, a cache maybe implemented.