Virus-cutting enzyme helps bacteria remember a threat