What will happen with cached index or table when it is modified, will it stay in cache?
If by cache you mean shared_buffers, no, it won't be removed from there due to being changed.  shared_buffers is the primary place where it does get changed.  From there it will eventually get pushed out to the kernel, and then from there to disk.