The latest key will always exists. The first time, the container os retrieved from the kernel and saved by hash and as latest. That container will now be used if you execute the getContainer method without options, assuming that the options keep the same.

If the options change, a new container os retrieved from the kernel and saved as hash and latest.

If you put the same options as the first time, the container is retrieced from the cache and set as latest.

It's an improvememt of the code suggested by you in #10, as the code there requires the user to put the same options every time he is executing this method