Unlike other passive mobs, Ocelots can despawn when the player moves too far away from them. This makes it difficult for the player to permanently cage or hold the Ocelot in any form of captivity for long. That off of Minecraft wiki about the bugs that come along with cats. I would just make sure to give it some attention every now and then to keep it from despawning and don't cage it.
Well the one thing I see on wiki is that one of the bugs with wolves is that they will sometimes teleport to you even if they're sitting. So you might just have to try it and see. I know though, that you shouldn't cage them... at least every time I tried to they despawned.
I know for a fact that wolves and ocelots/cats will teleport to you after a while, even if they are sitting.It happened to me when I had cats and it became so annoying that I had to get rid of them.