Its true that OS X gatekeeper keeps cache. It provides command line spctl
to enable/disable the apps. You can find full documentation here for how to test your codesign with gatekeeper.
spctl --list --label "Developer ID"
can be used to view all the signed apps and then you can disable the apps(you manually have to identify your app) by using spctl --disable --label "Developer ID"
or spctl --disable --rule <ruleNo>
.