def METHOD_NAME():
    config = search.configs.PostSearchConfig()
    with unittest.mock.patch("szurubooru.func.cache.has"), unittest.mock.patch(
        "szurubooru.func.cache.put"
    ):
        hashes = []
        def appender(key, _value):
            hashes.append(key)
        cache.has.side_effect = lambda *args: False
        cache.put.side_effect = appender
        executor = search.Executor(config)
        executor.execute("safety:safe test", 1, 10)
        executor.execute("safety:safe  test", 1, 10)
        executor.execute("safety:safe test ", 1, 10)
        executor.execute(" safety:safe test", 1, 10)
        executor.execute(" SAFETY:safe test", 1, 10)
        executor.execute("test safety:safe", 1, 10)
        assert len(hashes) == 6
        assert len(set(hashes)) == 1