Python script to test cache behavior