It'll remember you. In fact, cats probably won't even care that you've gone - they see themselves as superior to their human slaves and so long as the rest of your family continue to house and feed it, it won't be too worried.
Dogs, on the other hand, will be depressed for a few weeks after you leave, and greet you on your return with boundless enthusiasm and give you a "don't leave me again" look.