add flush function
Merge pull request #11 from Doomsta/feature/flush

add flush function to RedObject