Will caching WordPress affect session variables, custom filed updates and displaying images from a non wordpress table?

You can use W3TC or WP Supercache with fragment caching as seen in the following answers:

If you’re using full page cache, obviously the user session variables will get tossed within the page render specifically. However, you can wrap your session bits in dynamic fragment tags as illustrated in the answers above and they should work just fine. You can also access your session information in hooks that precede the actual cache rendering if you need to do some sort of pre-processing for the dynamic bits.

Sourcing from @Rarst’s answer here for W3TC:

Example 1:
<!-- mfunc any PHP code --><!-- /mfunc -->

Example 2:
<!-- mfunc -->any PHP code<!-- /mfunc -->

Example 3:
<!--MFUNC -->
    echo rand();
<!--/mfunc -->

Example 4:
<!-- mclude path/to/file.php --><!-- /mclude -->

Example 5:
<!-- mclude -->path/to/file.php<!-- /mclude -->

WordPress uses cookies rather than sessions. Why not use cookies instead? You can access cookies easily with JavaScript AND PHP. Session variables only have server-side access natively.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)