first commit, a general framework is done.

for (block in request)
{
	if (block is missing in cache)
	{
		//copy the block from origin to cache
		if (copying(block))
		{
			wait_in_queue;
		}
		else
		{
			copy(block, origin, cache);
			notify_queue;
		}
	}
}

if (ender & request != [])
{
	read_from_cache(request	- ender);
	read_from_origin(request & ender);
}
else
{
	read_from_cache(request);
}