Since iOS is a NIX-based platform, and you can compile the code with the GCC version for Apple (LLVM-GCC 4.2), you just have to make a function call __clear_cache(), for example:
extern void __clear_cache(char *beg, char *end);
__clear_cache(beg, end);
Note that this will NOT work with Apple LLVM Compiler 3.1, only with GCC for some odd reason.