I sometimes get the following error message "Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 8 bytes) On my Drupal 7 site once I have around 1500 records associated to a given content type then when viewing any of these nodes instead of seeing the content I sometimes get the following error message "Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 8 bytes) in /www/dev/drupal/includes/cache.inc on line 434". 
If I have less than 1500 records for a given content type (i.e. 1000 records) then viewing any of these contents always display without this error.
How can I prevent this error from occurring for a given content type that has at least 1500 records associated to it.
If you work in localhost, change memory_limit in your {php_installation_dir}/php.ini to a higher one.
Otherwise ask your web hosting service to increase the memory limit of the server.
(You can check your PHP memory limit in your Drupal site too: /admin/reports/status)