We consider the wiretap channel when a (secure) cache memory is added to the legitimate receiver. With the goal of utilizing coded caching for improving secrecy, during the cache placement phase, the receiver caches a function of the files, and the secret key shared with the transmitter subject to the memory constraint. The signals transmitted to serve the receiver's request during the delivery phase are observed by an eavesdropper over a wiretap channel. We characterize the secrecy capacity of the wiretap channel with a cache, i.e., the maximum achievable file size while keeping the overall database secure, for both the discrete memoryless and the Gaussian channels. The optimal caching scheme maximizes the utilization from the transmission over the delivery phase by sharing sufficient amount of keys between the legitimate communication nodes during the placement phase. Interestingly, we demonstrate that the existence of cache memory is an enabler of secure communication, i.e., the secrecy capacity remains positive, even when the main channel is degraded with respect to the eavesdropper channel.