Upgraded JoystickCache with edge detection