The volume of mass unsolicited electronic mail, often known as spam, has recently increased enormously and has become a serious threat to not only the Internet but also to society. A new spam detection method which uses document space density information has been proposed. Although the proposed method requires extensive e-mail traffic to acquire the necessary information, it can achieve perfect detection (i.e., both recall and precision is 100%) under practical conditions. This paper describes the memory management mechanism of this new spam detection method. Although the “Least Recently Used” strategy is the standard memory management strategy, we show that 1) the use of the direct-mapped cache can be used as a substitute for the LRU cache, and 2) “Retaining Multiply Accessed Entries” strategy can further improve the memory management performance and improve the theoretical recall rate for spam detection.