Looks like a copy&paste from WallNotifications code. Consider moving it somewhore around MemcacheSync class and use it in both places.