add debug_flush_compilation_cache to `Method` (#52317)
Summary:
Forgot to add `debug_flush_compilation_cache ` to `Method` as well.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/52317
Reviewed By: bdhirsh
Differential Revision: D26583313
Pulled By: Krovatkin
fbshipit-source-id: 1b3e503950cc3314796aff53b3b8038d16767870