2q cache refactoring

Test to increase am queue size was added.
Refactoring of method that increases size.