Bereshit / Genesis 40:23
וְלֹא־זָכַר שַׂר־הַמַּשְׁקִים אֶת־יוֹסֵף וַיִּשְׁכָּחֵהוּ׃
Yet the chief cupbearer did not remember Yosef, and he forgot him.
Pshat פְּשָׁט
Did not remember, and forgot
Rashi: "did not remember" that same day, "forgot" afterwards. Yosef put his trust in the cupbearer, and for this sat two more years, for "happy is the man who made the Eternal his trust". Ibn Ezra: "did not remember" — did not mention him aloud to Pharaoh, "forgot" — in his heart.
How Rashi and Ibn Ezra explain it
Remez רֶמֶז
Two years by the count of words
Baal HaTurim: "and did not remember" appears three times in Tanakh: of the cupbearer, of King Yoash, who forgot the kindness of the priest Yehoyada, and "did not remember His footstool" in Eichah. Ingratitude leads to destruction. Kli Yakar: "if you remember me" (אִם זְכַרְתַּנִי) is 728 in gematria, like "you will forget" (תִּשְׁכַּח). Two years are 730 days: 728 and two more days for the words "mention me" and "bring me out".
How Kitzur Ba'al HaTurim and Kli Yakar explain it
Drash דְּרָשׁ
The angel untied the knots
Lekach Tov: the cupbearer wanted to remember and tied knots as reminders, and an angel untied them. God said: "though you forgot, I did not forget". Yosef kept the Ten Utterances: "fled" four times, "went out" twice, "outside" four times. And the eight verses of the parasha without an opening vav (ו) stand for circumcision on the eighth day.
How Midrash Lekach Tov explain it
Sod סוֹד
Memory is cleaving
Agra DeKala: the cupbearer forgot even Yosef's name. This was from God: the name was hidden for twenty-two years, as long as Yaakov had not served his father. Sefat Emet: memory is the cleaving of the soul. The Greeks wanted to make the Torah mere wisdom, like other sciences, and so take memory from Israel. Of this we say on Chanukah "to make them forget Your Torah".
How Agra DeKala and Sefat Emet explain it