For a Psychology Statistics class, I oversaw a small group of other student experimenters. I devised an experiment which extended the idea this concept: When you leave a room, you sometimes forget what you were thinking. This is [partly] because the visual cues from the room are now gone. Normally, we associate, in our minds, our thoughts with the context surrounding us. In our mind is a map of our environment, onto, or within which, our trains of thought are drawn. Replace one map with another, and there is cognitive dissonance, which can block some memories from retrieval. (This probably applies more to active memory recall or selection, as opposed to recognition). CONTEXT IS KEY.
[Notes: This is, of course, not an absolute changer of cognition, because there are other cues, contexts, and dynamics going on. For example, there are external auditory, tactile, etc., cues at play, as there are also internal cues, like stress level, etc. My experiment was a success, btw, and was taken up by the professor, who printed it up in a journal, giving me no credit. Because, he went into another room to me. ("Livin' in another world to you.")]
Context is key. In mind. In crime. And even in authority.
But, most of all, in time.